CameraPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 #ifndef _GAZEBO_CAMERA_PLUGIN_HH_
18 #define _GAZEBO_CAMERA_PLUGIN_HH_
19 
20 #include <string>
21 
22 #include "gazebo/common/Plugin.hh"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
30  {
31  public: CameraPlugin();
32 
34  public: virtual ~CameraPlugin();
35 
36  public: virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
37 
38  public: virtual void OnNewFrame(const unsigned char *_image,
39  unsigned int _width, unsigned int _height,
40  unsigned int _depth, const std::string &_format);
41 
42  protected: unsigned int width, height, depth;
43  protected: std::string format;
44 
47 
48  private: event::ConnectionPtr newFrameConnection;
49  };
50 }
51 #endif
std::shared_ptr< Sensor > SensorPtr
Definition: SensorTypes.hh:63
Forward declarations for the common classes.
Definition: Animation.hh:33
unsigned int width
Definition: CameraPlugin.hh:42
std::string format
Definition: CameraPlugin.hh:43
std::shared_ptr< CameraSensor > CameraSensorPtr
Definition: SensorTypes.hh:71
sensors::CameraSensorPtr parentSensor
Definition: CameraPlugin.hh:45
Definition: CameraPlugin.hh:29
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
rendering::CameraPtr camera
Definition: CameraPlugin.hh:46
A plugin with access to physics::Sensor.
Definition: Plugin.hh:274
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:88