23 #ifndef GAZEBO_ROS_JOINT_TRAJECTORY_PLUGIN_HH 24 #define GAZEBO_ROS_JOINT_TRAJECTORY_PLUGIN_HH 29 #include <boost/thread.hpp> 30 #include <boost/thread/mutex.hpp> 37 #include <trajectory_msgs/JointTrajectory.h> 38 #include <geometry_msgs/Pose.h> 42 #include <gazebo_msgs/SetJointTrajectory.h> 45 #include <gazebo/physics/physics.hh> 46 #include <gazebo/transport/TransportTypes.hh> 47 #include <gazebo/common/Time.hh> 48 #include <gazebo/common/Plugin.hh> 49 #include <gazebo/common/Events.hh> 62 public:
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
66 const trajectory_msgs::JointTrajectory::ConstPtr& trajectory);
69 const gazebo_msgs::SetJointTrajectory::Request& req,
70 const gazebo_msgs::SetJointTrajectory::Response& res);
119 private: std::vector<gazebo::physics::JointPtr>
joints_;
120 private: std::vector<trajectory_msgs::JointTrajectoryPoint>
points_;
128 private: sdf::ElementPtr
sdf;
virtual ~GazeboRosJointPoseTrajectory()
Destructor.
event::ConnectionPtr update_connection_
bool physics_engine_enabled_
unsigned int trajectory_index
geometry_msgs::Pose model_pose_
bool disable_physics_updates_
GazeboRosJointPoseTrajectory()
Constructor.
boost::thread deferred_load_thread_
boost::mutex update_mutex
A mutex to lock access to fields that are used in message callbacks.
ros::CallbackQueue queue_
std::string topic_name_
topic name
std::vector< gazebo::physics::JointPtr > joints_
ros::NodeHandle * rosnode_
pointer to ros node
physics::LinkPtr reference_link_
pose should be set relative to this link (default to "world")
boost::thread callback_queue_thread_
std::vector< trajectory_msgs::JointTrajectoryPoint > points_
void SetTrajectory(const trajectory_msgs::JointTrajectory::ConstPtr &trajectory)
Update the controller.
trajectory_msgs::JointTrajectory trajectory_msg_
ros message
std::string reference_link_name_
common::Time last_time_
save last_time
std::string service_name_
common::Time trajectory_start
std::string robot_namespace_
for setting ROS name space
trajectory_msgs::JointTrajectory joint_trajectory_
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
Load the controller.