1 #ifndef GAZEBO_ROS_DIFFDRIVE_UOS 2 #define GAZEBO_ROS_DIFFDRIVE_UOS 5 #include <gazebo/common/Plugin.hh> 6 #include <gazebo/common/Time.hh> 7 #include <gazebo/common/Events.hh> 8 #include <gazebo/physics/physics.hh> 10 #include <geometry_msgs/TwistWithCovariance.h> 11 #include <sensor_msgs/JointState.h> 13 #include <boost/thread.hpp> 23 virtual void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
29 void OnCmdVel(
const geometry_msgs::TwistConstPtr &msg);
83 sensor_msgs::JointState
js_;
std::string cmd_vel_topic_name_
std::string node_namespace_
sensor_msgs::JointState js_
virtual void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
std::string joint_states_topic_name_
physics::WorldPtr my_world_
float torque_
maximum torque applied to the wheels [Nm]
float wheel_speed_right_
Desired speeds of the wheels.
virtual void UpdateChild()
ros::Publisher joint_state_pub_
boost::thread * spinner_thread_
common::Time prev_update_time_
float wheel_sep_
Separation between the wheels.
event::ConnectionPtr updateConnection
physics::ModelPtr my_parent_
float turning_adaptation_
Turning adaptation for odometry.
static const double CMD_VEL_TIMEOUT
std::string odom_topic_name_
float wheel_diam_
Diameter of the wheels.
ros::NodeHandle * rosnode_
common::Time last_cmd_vel_time_
virtual ~GazeboRosDiffdrive()
std::vector< physics::JointPtr > joints_
ros::Subscriber cmd_vel_sub_
void OnCmdVel(const geometry_msgs::TwistConstPtr &msg)
float max_velocity_
maximum linear speed of the robot [m/s]