Quadruped slide away in gazebo with ros2 control

After spawing the urdf model of GO1 quadruped from unitree in gazebo using ROS2, the models slides away. I faced same issue with ROS1 but after loading PID parameters alongside the gazebo ros controller I was able to get it up and running with no problem / sliding.

Hello @navneethooda, welcome to the community!

In order to be able to tackle the issue, could you please post the XACRO/URDF code and an image of the robot?



Hi Mr. Roberto,
Here is the github link to the code repo:

The package was build using ROS2 Galactic.
Below are the screen shots of the robot spawned in gazebo:


Here you can see the broadcaster & controller are in place:

ROS2 topics in place:

Hello @navneethooda,

thanks for the updated information. From what I have understood so far, the robot gets spawn into simulation standing upright and then it tips over and rolls onto its back, with all four legs in the air, right?

If that is the case, then I would guess that the problem might be caused by bad physics of the robot (mass properties, centre of gravity location, inertia tensor, damping, friction) or collision model.

It could be that those properties may require some more tuning. One of the most common side effects of having incorrect physical characteristics is when the robot jitters enough to slowly move itself / slide across the ground flour.

Since physics simulation is hard to make stable I would suggest to first contact the manufacturer of the robot and ask for a stable robot model that can be used in Gazebo. At best they might provide a robot model that has been tested in Gazebo; at worst you will have to do the tweaking yourself.

In closing it doesn’t seem to me that this problem is related to ROS2_Control since you are seeing the controllers active and the topics are being published. My suggestion concerning ROS2_Control is that you isolate the problem of physics of the robot from the ROS2_Control part by placing the robot on a stand just as the robot from the course ROS2_Control. This way you can check that you are able to control the robot’s legs without having to worry about having the robot model properties 100% correct. Then, one you solve the robot model problem you can put your robot out of the stand and back to its feet.

Hope these hints help,


Mr. Roberto,
You are right about physics and also the way collisions are handled in gazebo. The same problems i faced in ROS1 noetic, I rectified all these problems by just adding PID parameters for robot joints and loading them in launch file.

Here you can see, the same robot urdf file spawned; robot is upright and controllers are loaded, no jitters/sliding of the robot. It just works fine in ROS1 with PID values, I simply have no clue how to specify the PID values in the ROS2 yaml config file, aa all forums suggest that this functionality is not there in ROS2. Also, i tried ROS1 bridge but i am unable to get the controller topics bridged across to ROS2.

Hi @navneethooda,

I have the same information, last I know ROS2_Control does not implement PID controllers by itself, it forwards the command signal down to the joints, or in this case the Gazebo Plugin. All that comes into my mind is that you could ask the manufacturer of the robot if they can provide a working robot model/ simulation or you may ask the developers / maintainers of gazebo_ros2_control about the PID issue.

As to bridging to ROS1, it is something I’d like to learn more about myself. I don’t really use it a lot.

Lets see what others say. If anyone else in the forum knows of a way to solve this problem, then I would love to hear it.



This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.