I am trying to make a 4 wheeled robot simulation in Gazebo Sim (formerly Ignition). I am using the differential drive plugin for driving the robot using teleop through /cmd_vel topic.

My system details

  • OS : Ubuntu 22.04
  • ROS 2 version : Humble
  • Gazebo Sim version : Fortress

Here is my gazebo plugin for differential drive where I have mentioned 4 wheel joints

    <plugin filename="ignition-gazebo-diff-drive-system" name="ignition::gazebo::systems::DiffDrive">

The Gazebo sim bridge for the ROS 2 topics is defined in the gz-sim.launch.py file

gz_ros2_bridge = Node(
        "/cmd_vel@geometry_msgs/msg/[email protected]",
        ('/model/skid_steer_robot/tf', '/tf')

But as you can see in below images, the data visualization in Rviz2 is not working properly. The topics in rviz2 is somewhat not correclty visualized as compared to the simulation.

The below attached video will help you understand the problem I am facing more clearly.

enter image description here enter image description here

Here is the complete description package for the skid steer robot nilutpolkashyap/skid_steer_robot

Here is the video showing the error skid_steer_error.webm video

Thank you for your time


1 Answer 1


The diff drive plugin only assumes one left and right wheel, while you have two each side. What I would do it simply instantiate two plugins, one for the front wheels (with cmd_vel) and one for the back ones (with e.g. cmd_vel_back). Then run one bridge for cmd_vel, and another one for cmd_vel_back but remapping the ROS topic to cmd_vel. This way Gazebo will received your ROS cmd_vel topic on both the front and back wheels. One of the two plugins should also not publish anything, as you have a single odom or /tf topic anyway.

  • $\begingroup$ It did not solve the error for me. I noticed that I am getting the real-time factor as close as 10-20%. Is this in some way causing the error? $\endgroup$ Commented Jul 8 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.