DepthCameraPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GAZEBO_PLUGINS_DEPTHCAMERAPLUGIN_HH_
19 #define GAZEBO_PLUGINS_DEPTHCAMERAPLUGIN_HH_
20 
21 #include <string>
22 
23 #include "gazebo/common/Plugin.hh"
27 #include "gazebo/util/system.hh"
28 
29 namespace gazebo
30 {
32  {
34  public: DepthCameraPlugin();
35 
37  public: virtual ~DepthCameraPlugin();
38 
39  public: void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
40 
41  public: virtual void OnNewDepthFrame(const float *_image,
42  unsigned int _width, unsigned int _height,
43  unsigned int _depth, const std::string &_format);
44 
46  public: virtual void OnNewRGBPointCloud(const float *_pcd,
47  unsigned int _width, unsigned int _height,
48  unsigned int _depth, const std::string &_format);
49 
50  public: virtual void OnNewImageFrame(const unsigned char *_image,
51  unsigned int _width, unsigned int _height,
52  unsigned int _depth, const std::string &_format);
53 
54  protected: unsigned int width, height, depth;
55  protected: std::string format;
56 
59 
60  private: event::ConnectionPtr newDepthFrameConnection;
61  private: event::ConnectionPtr newRGBPointCloudConnection;
62  private: event::ConnectionPtr newImageFrameConnection;
63  };
64 }
65 #endif
std::shared_ptr< Sensor > SensorPtr
Definition: SensorTypes.hh:64
rendering::DepthCameraPtr depthCamera
Definition: DepthCameraPlugin.hh:58
std::string format
Definition: DepthCameraPlugin.hh:55
unsigned int width
Definition: DepthCameraPlugin.hh:54
boost::shared_ptr< DepthCamera > DepthCameraPtr
Definition: RenderTypes.hh:97
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
std::shared_ptr< DepthCameraSensor > DepthCameraSensorPtr
Definition: SensorTypes.hh:84
A plugin with access to physics::Sensor.
Definition: Plugin.hh:289
Definition: DepthCameraPlugin.hh:31
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58
sensors::DepthCameraSensorPtr parentSensor
Definition: DepthCameraPlugin.hh:57