Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _GAZEBO_MULTI_CAMERA_PLUGIN_HH_
00018 #define _GAZEBO_MULTI_CAMERA_PLUGIN_HH_
00019
00020 #include <string>
00021 #include <vector>
00022
00023 #include <gazebo/common/Plugin.hh>
00024 #include <gazebo/sensors/MultiCameraSensor.hh>
00025 #include <gazebo/rendering/Camera.hh>
00026 #include <gazebo/gazebo.hh>
00027
00028 namespace gazebo
00029 {
00030 class MultiCameraPlugin : public SensorPlugin
00031 {
00032 public: MultiCameraPlugin();
00033
00035 public: virtual ~MultiCameraPlugin();
00036
00037 public: virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
00038
00039 public: virtual void OnNewFrameLeft(const unsigned char *_image,
00040 unsigned int _width, unsigned int _height,
00041 unsigned int _depth, const std::string &_format);
00042 public: virtual void OnNewFrameRight(const unsigned char *_image,
00043 unsigned int _width, unsigned int _height,
00044 unsigned int _depth, const std::string &_format);
00045
00046 protected: sensors::MultiCameraSensorPtr parentSensor;
00047
00048 protected: std::vector<unsigned int> width, height, depth;
00049 protected: std::vector<std::string> format;
00050
00051 protected: std::vector<rendering::CameraPtr> camera;
00052
00053 private: std::vector<event::ConnectionPtr> newFrameConnection;
00054 };
00055 }
00056 #endif