Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GAZEBO_ROS_MULTICAMERA_HH
00019 #define GAZEBO_ROS_MULTICAMERA_HH
00020
00021 #include <string>
00022 #include <vector>
00023
00024
00025 #include <gazebo_plugins/gazebo_ros_camera_utils.h>
00026 #include <gazebo_plugins/MultiCameraPlugin.h>
00027
00028 namespace gazebo
00029 {
00030 class GazeboRosMultiCamera : public MultiCameraPlugin
00031 {
00034 public: GazeboRosMultiCamera();
00035
00037 public: ~GazeboRosMultiCamera();
00038
00041 public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
00042
00043 std::vector<GazeboRosCameraUtils*> utils;
00044
00045 protected: void OnNewFrame(const unsigned char *_image,
00046 GazeboRosCameraUtils* util);
00049 protected: virtual void OnNewFrameLeft(const unsigned char *_image,
00050 unsigned int _width, unsigned int _height,
00051 unsigned int _depth, const std::string &_format);
00052 protected: virtual void OnNewFrameRight(const unsigned char *_image,
00053 unsigned int _width, unsigned int _height,
00054 unsigned int _depth, const std::string &_format);
00055
00059 private: boost::shared_ptr<int> image_connect_count_;
00060 private: boost::shared_ptr<boost::mutex> image_connect_count_lock_;
00061 private: boost::shared_ptr<bool> was_active_;
00062 };
00063 }
00064 #endif
00065