18 #ifndef _ROS_LOGICAL_CAMERA_PLUGIN_HH_ 19 #define _ROS_LOGICAL_CAMERA_PLUGIN_HH_ 23 #include "gazebo/common/Plugin.hh" 24 #include "gazebo/common/UpdateInfo.hh" 25 #include "gazebo/msgs/logical_camera_image.pb.h" 26 #include "gazebo/physics/PhysicsTypes.hh" 27 #include "gazebo/transport/Node.hh" 28 #include "gazebo/transport/Subscriber.hh" 29 #include "gazebo/transport/TransportTypes.hh" 46 protected: physics::ModelPtr
model;
52 protected: sensors::SensorPtr
sensor;
57 public:
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
64 public:
void OnImage(ConstLogicalCameraImagePtr &_msg);
67 protected: transport::NodePtr
node;
sensors::SensorPtr sensor
The logical camera sensor.
virtual ~ROSLogicalCameraPlugin()
Destructor.
ROS publisher for the logical camera.
void OnImage(ConstLogicalCameraImagePtr &_msg)
Callback for when logical camera images are received.
physics::LinkPtr cameraLink
Link that holds the logical camera.
transport::SubscriberPtr imageSub
Subscription to logical camera image messages from gazebo.
ros::Publisher imagePub
ROS publisher for the logical camera image.
transport::NodePtr node
Node for communication with gazebo.
physics::ModelPtr model
Model that contains the logical camera.
ROSLogicalCameraPlugin()
Constructor.
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
void FindLogicalCamera()
Searches the model links for a logical camera sensor.
ros::NodeHandle * rosnode
ros node handle
std::string robotNamespace
for setting ROS name space