gazebo_ros_projector.h
Go to the documentation of this file.
1 /*
2  * Desc: A dynamic controller plugin that controls texture projection.
3  * Author: Jared Duke
4  * Date: 17 June 2010
5  * SVN: $Id$
6  */
7 #ifndef GAZEBO_ROS_PROJECTOR_HH
8 #define GAZEBO_ROS_PROJECTOR_HH
9 
10 // Custom Callback Queue
11 #include <ros/callback_queue.h>
12 #include <ros/subscribe_options.h>
13 
14 #include <ros/ros.h>
15 #include <boost/thread/mutex.hpp>
16 
17 #include <gazebo/physics/physics.hh>
18 #include <gazebo/transport/TransportTypes.hh>
19 #include <gazebo/transport/Node.hh>
20 #include <gazebo/common/Time.hh>
21 #include <gazebo/common/Plugin.hh>
22 #include <gazebo/common/Events.hh>
23 #include <gazebo/rendering/RenderTypes.hh>
24 
25 #include <std_msgs/String.h>
26 #include <std_msgs/Int32.h>
27 
28 #include <OgrePrerequisites.h>
29 #include <OgreTexture.h>
30 #include <OgreFrameListener.h>
31 
32 namespace Ogre
33 {
34  class PlaneBoundedVolumeListSceneQuery;
35  class Frustum;
36  class Pass;
37  class SceneNode;
38 }
39 
40 namespace gazebo
41 {
42 
45 
75 class GazeboRosProjector : public ModelPlugin
76 {
79  public: GazeboRosProjector();
80 
82  public: virtual ~GazeboRosProjector();
83 
86  protected: virtual void Load( physics::ModelPtr _parent, sdf::ElementPtr _sdf );
87 
89  private: physics::WorldPtr world_;
90 
92  private: void LoadImage(const std_msgs::String::ConstPtr& imageMsg);
93 
95  private: void ToggleProjector(const std_msgs::Int32::ConstPtr& projectorMsg);
96 
101 
103  private: std::string texture_topic_name_;
104 
106  private: std::string projector_topic_name_;
107 
109  private: std::string robot_namespace_;
110 
111  // Custom Callback Queue
113  private: void QueueThread();
114  private: boost::thread callback_queue_thread_;
115 
116  private: event::ConnectionPtr add_model_event_;
117 
118  private: transport::NodePtr node_;
119  private: transport::PublisherPtr projector_pub_;
120 };
121 
123 
125 }
126 #endif
127 
std::string robot_namespace_
For setting ROS name space.
std::string projector_topic_name_
ROS projector topic name.
physics::WorldPtr world_
pointer to the world
ros::NodeHandle * rosnode_
A pointer to the ROS node. A node will be instantiated if it does not exist.
event::ConnectionPtr add_model_event_
transport::PublisherPtr projector_pub_
std::string texture_topic_name_
ROS texture topic name.


gazebo_plugins
Author(s): John Hsu
autogenerated on Tue Mar 26 2019 02:31:27