Advertisement
Guest User

GazeboRosRfidTag.h

a guest
May 8th, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.44 KB | None | 0 0
  1. /*
  2. * Gazebo - Outdoor Multi-Robot Simulator
  3. * Copyright (C) 2003
  4. * Nate Koenig & Andrew Howard
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. */
  21. /*
  22. * Desc: 3D position interface.
  23. * Author: Sachin Chitta and John Hsu
  24. * Date: 10 June 2008
  25. * SVN: $Id$
  26. */
  27. #ifndef GAZEBO_ROS_RFIDTAG_HH
  28. #define GAZEBO_ROS_RFIDTAG_HH
  29.  
  30. #include <vector>
  31. #include <string>
  32.  
  33. #include <gazebo/sensors/SensorTypes.hh>
  34. #include <gazebo/sensors/Sensor.hh>
  35. #include <gazebo/math/gzmath.hh>
  36.  
  37. #include <ros/ros.h>
  38.  
  39. #include <gazebo/physics/physics.hh>
  40. #include <gazebo/transport/TransportTypes.hh>
  41. #include <gazebo/common/Time.hh>
  42. #include <gazebo/common/Plugin.hh>
  43. #include <gazebo/common/Events.hh>
  44.  
  45. namespace gazebo
  46. {
  47.  
  48.    class GazeboRosRfidTag: public ModelPlugin
  49.    {
  50.       /// \brief Constructor
  51.       public: GazeboRosRosRfidTag();
  52.  
  53.       /// \brief Destructor
  54.       public: virtual ~GazeboRosRfidTag();
  55.  
  56.       /// \brief Load the controller
  57.       public: void Load( physics::ModelPtr _parent, sdf::ElementPtr _sdf );
  58.       private: void GazeboRosRfidTag::OnScan();
  59.  
  60.     /// \brief pointer to ros node
  61.     private: ros::NodeHandle* rosnode_;
  62.     private: ros::Publisher contact_pub_;
  63.  
  64.     private: sensors::RfidSensorPtr parentSensor;
  65.  
  66.     /// \brief set topic name of broadcast
  67.     private: std::string scan_topic_name_;
  68.  
  69.     private: std::string frame_name_;
  70.  
  71.         /// \brief broadcast some string for now.
  72.     private: msgs::Pose scan_pose_msg_;
  73.  
  74.     /// \brief for setting ROS name space
  75.     private: std::string robot_namespace_;
  76.  
  77.     private: ros::CallbackQueue scan_queue_;
  78.     private: void ScanQueueThread();
  79.     private: boost::thread callback_queue_thread_;
  80.  
  81.     // Pointer to the update event connection
  82.     private: event::ConnectionPtr update_connection_;
  83.   };
  84. }
  85.  
  86. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement