Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo ROS diff drive controller cmd_vel timeout

asked 2019-07-09 03:52:05 -0500

VansFannel gravatar image

I'm using ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS.

I have defined this diff drive controller for a Pioneer 2DX that I use in Gazebo. The robot comes from Gazebo library, and I have changed its controller for this one:

<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
  <alwaysOn>true</alwaysOn>
  <updateRate>100</updateRate>
  <leftJoint>left_wheel_hinge</leftJoint>
  <rightJoint>right_wheel_hinge</rightJoint>
  <torque>20</torque>
  <commandTopic>mybot/cmd_vel</commandTopic>
  <odometryTopic>mybot/odom_diffdrive</odometryTopic>
  <odometryFrame>odom</odometryFrame>
  <rosDebugLevel>1</rosDebugLevel>
  <publishWheelTF>false</publishWheelTF>
  <publishOdomTF>true</publishOdomTF>
  <publishWheelJointState>false</publishWheelJointState>
  <wheelAcceleration>0</wheelAcceleration>
  <wheelTorque>5</wheelTorque>
  <odometrySource>world</odometrySource>
  <publishTf>1</publishTf>
  <robotBaseFrame>chassis</robotBaseFrame>
  <wheelSeparation>0.39</wheelSeparation>
  <wheelDiameter>0.15</wheelDiameter>
</plugin>

I'm new in ROS development, and I have read that most mobile base drivers will time out and stop the robot if they don't receive at least several messages per second.

Reading Diff Drive Controller ROS API, I have found that there is a parameter called cmd_vel_timeout that will do what I want to do.

Is there something similar in the libgazebo_ros_diff_drive.so that will stop the robot after no receiving cmd_vel messages for n seconds?

By the way, now, when I press Ctrl.+C, the robot doesn't stop. It seems that the robot doesn't any timeout value configured.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-09 07:33:27 -0500

chapulina gravatar image

There isn't a parameter like that. You could add one, here's the code.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-09 03:52:05 -0500

Seen: 13 times

Last updated: Jul 09