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
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GAZEBO_ROS_PROSILICA_CAMERA_HH
00028 #define GAZEBO_ROS_PROSILICA_CAMERA_HH
00029
00030
00031 #include <gazebo_plugins/gazebo_ros_camera_utils.h>
00032 #include "plugins/DepthCameraPlugin.hh"
00033
00034 #include <ros/callback_queue.h>
00035 #include "boost/thread/mutex.hpp"
00036
00037
00038 #include "cv_bridge/cv_bridge.h"
00039
00040 #include "sensor_msgs/RegionOfInterest.h"
00041
00042
00043
00044 #include <image_transport/image_transport.h>
00045 #include <polled_camera/publication_server.h>
00046 #include <polled_camera/GetPolledImage.h>
00047
00048 namespace gazebo
00049 {
00050
00051 class GazeboRosProsilica : public DepthCameraPlugin, GazeboRosCameraUtils
00052 {
00055 public: GazeboRosProsilica();
00056
00058 public: virtual ~GazeboRosProsilica();
00059
00062 public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
00063
00065 private: static void mouse_cb(int event, int x, int y, int flags, void* param) { };
00066
00068 private: polled_camera::PublicationServer poll_srv_;
00069
00070 private: std::string mode_;
00071
00072 private: std::string mode_param_name;
00073
00075
00076
00077
00078
00079
00080
00081 private: void pollCallback(polled_camera::GetPolledImage::Request& req,
00082 polled_camera::GetPolledImage::Response& rsp,
00083 sensor_msgs::Image& image, sensor_msgs::CameraInfo& info);
00084
00087 private: sensor_msgs::Image *roiImageMsg;
00088 private: sensor_msgs::CameraInfo *roiCameraInfoMsg;
00089
00091 private: std::string pollServiceName;
00092
00093
00094
00095
00096
00097
00098
00100 protected: virtual void OnNewDepthFrame(const float *_image,
00101 unsigned int _width, unsigned int _height,
00102 unsigned int _depth, const std::string &_format) {};
00103
00104
00106 protected: virtual void OnNewImageFrame(const unsigned char *_image,
00107 unsigned int _width, unsigned int _height,
00108 unsigned int _depth, const std::string &_format);
00109
00110 };
00111
00112 }
00113 #endif
00114