Ask Your Question

Use of diff_drive_controller to simulate a differential drive in Gazebo

asked 2017-12-06 01:41:26 -0600

Toma Tacescu gravatar image

Did anybody manage to use diff_drive_controller in to simulate a differential drive in Gazebo**? Theoretically should work if the gazebo_ros_control ( plug in is used in Gazebo but there is a note that the hardware_interface::VelocityJointInterface is not fully implemented.

edit retag flag offensive close merge delete


Works for me, do you have any specific question?

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-12-06 02:05:03 -0600 )edit

It is not necessary to implement RobotHWSim, it works using just the Gazebo plugin, correct? Do you know of any robot sample that have implemented this configuration?

Toma Tacescu gravatar imageToma Tacescu ( 2017-12-06 02:24:40 -0600 )edit

libgazebo_ros_control with DefaultRobotHWSim should do.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-12-06 03:15:02 -0600 )edit

As an example I would only have mine atm: launch-, urdf- file.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-12-06 03:15:56 -0600 )edit

Husky might use it.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-12-06 03:19:13 -0600 )edit

Thank you! I really appreciate your feedback!

Toma Tacescu gravatar imageToma Tacescu ( 2017-12-06 03:24:45 -0600 )edit

Do you also use the diff_drive_controller on the real robot? I was looking at the links from your repository and could not find the diff_drive_controller implemented on the hardware robot.

Toma Tacescu gravatar imageToma Tacescu ( 2017-12-06 14:32:39 -0600 )edit

No, only simulation, "real" odometry calculation is done on a separate real time cpu

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-12-06 14:51:11 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-10 23:18:43 -0600

Toma Tacescu gravatar image

@Humpelstilzchen thank you for your help! It works and your suggestions helped a lot!

Here are some of the key steps that may help others:

  • in the robot model need to use <plugin name="gazebo_ros_control" filename="">
  • in the robot model need SimpleTransmission reference
  • in the robot model inertia values exported from CAD do not always work
  • orientation of the robot is not always exported correctly from CAD (X axis forward)
  • need to setup diff_drive_controller.yaml parameters (these worked for me: )
  • need to run the controller_spawner node: <node name="controller_spawner" pkg="controller_manager" type="spawner" output="screen" ns="/robot1" args="joint_state_controller diff_drive_controller"/>
  • I had to be very specific with the name space
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-12-06 01:41:26 -0600

Seen: 1,316 times

Last updated: Dec 10 '17