Instability found with gazebo model with dex wrist

Hi, I found out that the robot model is instable with dex wrist. It is find when the joint value is zero but the joint starts shaking when the value exceeds -1.0. I wonder if this is a known issue and how to address it. I tried to increase friction and damping but didn’t help.

After updating to the latest model description, it is stable now.

The issue is still there. When I navigate the robot to certain location, it fell down and started shaking.

Hi @gtsimonxu, I believe that instability such as falling over/shaking are not uncommon with the Gazebo Classic simulator. Are you seeing the same behavior with the Stretch Gazebo simulation when using the standard gripper? @Mohamed_Fazil has more experience with the Gazebo simulation and should be able to help here.

Hi @bshah , the instability doesn’t exist for the standard gripper. I aimed to test the top-down grasp algorithm, that why I used dex wrist.

Hi @bshah , I tested and found the same issue happened for the standard gripper now as well. I think it is due to the new mass data commited last month.

Hi @Mohamed_Fazil , do you have any thoughts about it? Thanks!

@gtsimonxu thankyou for reporting this issue. Iam working on reproducing this issue in my computer. It is interesting that the new mass data might be causing the issue. Was your standard gripper performing good before pulling the new mass properties?
I will post an update here on my findings soon.

Mohamed Fazil

@Mohamed_Fazil Thank you so much for the quick reply. The standard gripper worked well before pulling the new mass. Please let me know if you are able to reproduce the issue. If not, maybe due to different version of Gazebo?

Btw, for new mass, if I set the initial joint value of link_wrist_pitch below 1.0, the model with dex wrist can be intialized with stability but starts shaking when it moves. If the initial value is set over 1.0, the model starts shaking at the beginning.

@gtsimonxu I tried reproducing the instability issues with the updated URDF mass parameters and I wasn’t able to reproduce the instability issue you were facing while initializing the joint_wrist_pitch with different values or moving the robot with dex wrist around with the keyboard teleop.

In fact I also tried moving the robot around and making the gripper contact with another rigid surface (cafe_table model). Pressing against the table with the arm extended and moving the lift down would make the robot’s right wheel lift a bit. And moving the lift up again would make robot settle down back to stable surface which is somewhat an accurate dynamic behaviour. There was momentarily some slight instable motions on the arm and dexwrist but this is common in our experience.

I initialized the wrist pitch joint with various values by adding -J joint_wrist_pitch -1.0 to URDF spawner’s args in this line in gazebo.launch file.

For your information I am using the Gazebo-11 version with ros noetic. You can verify your version with the following command output and I have also attached my output for your reference. You can try installing the below gazebo version if you haven’t already and try redoing the your experiment.

$ apt list --installed | grep gazebo
gazebo11-common/now 11.12.0-1~focal all [installed,upgradable to: 11.13.0-1~focal]
gazebo11-plugin-base/now 11.12.0-1~focal amd64 [installed,upgradable to: 11.13.0-1~focal]
gazebo11/now 11.12.0-1~focal amd64 [installed,upgradable to: 11.13.0-1~focal]
libgazebo11-dev/now 11.12.0-1~focal amd64 [installed,upgradable to: 11.13.0-1~focal]
libgazebo11/now 11.12.0-1~focal amd64 [installed,upgradable to: 11.13.0-1~focal]
ros-noetic-gazebo-dev/focal,now 2.9.2-1focal.20210423.224909 amd64 [installed,automatic]
ros-noetic-gazebo-msgs/now 2.9.2-1focal.20230216.002929 amd64 [installed,upgradable to: 2.9.2-1focal.20230620.191337]
ros-noetic-gazebo-plugins/now 2.9.2-1focal.20230216.013507 amd64 [installed,upgradable to: 2.9.2-1focal.20230620.200252]
ros-noetic-gazebo-ros-control/now 2.9.2-1focal.20230216.004103 amd64 [installed,upgradable to: 2.9.2-1focal.20230620.200308]
ros-noetic-gazebo-ros-pkgs/now 2.9.2-1focal.20230216.020030 amd64 [installed,upgradable to: 2.9.2-1focal.20230620.204527]
ros-noetic-gazebo-ros/now 2.9.2-1focal.20230216.003206 amd64 [installed,upgradable to: 2.9.2-1focal.20230620.195503]
ros-noetic-turtlebot3-gazebo/now 1.3.2-2focal.20230306.095910 amd64 [installed,upgradable to: 1.3.2-2focal.20230620.200322]

Further if could also send me a a screen recording video of the issue you are facing would be helpful.

I uploaded two videos to my youtube channel since it didn’t allow me to upload attachment. Links are and

I cloned the new repo and built a new workspace. I found that the issue happened when the robot rotated. It seems moving forward wouldn’t lead to the problem. I tested with default and customized world, and confirmed that the issue of shaking didn’t come from the world but the robot itself.

@gtsimonxu Thank you for the videos. It looks like you are publishing your base velocities only. For further investigation, could you also share details on the exact base velocity values and the rate at which you publish to the topic /stretch_diff_drive_controller/cmd_vel? A script to reproduce your issue would be helpful.

I simply ran demo of stretch_gazebo and used the keyboard to control the robot.

# Terminal 1:
roslaunch stretch_gazebo gazebo.launch rviz:=true
# Terminal 2:
roslaunch stretch_core teleop_twist.launch twist_topic:=/stretch_diff_drive_controller/cmd_vel linear:=1.0 angular:=2.0 teleop_type:=keyboard

Hi @Mohamed_Fazil , I wonder if there are any updates. Thank you so much for your time.

Hi @gtsimonxu , Sorry for the delay. I was able to reproduce the issues you were facing. It certainly looks like high angular velocities (>0.3 rad/s) are resulting in unstable dynamics of the robot arm.

I was previously using the keyboard_teleop_node from the stretch_gazebo package to move robot around which would publish a maximum base angular velocity of only 0.2 rad/s which is very low but keeps the robot stable.

You can try to reduce the angular velocity published by the teleop_twist node you are using to below 0.3 rad/s and might see an improved stability. It is definitely not the ideal capable angular velocity of the robot base but it looks like we would have to debug into the dynamic model’s setting more to fix this issue which might take some more time. I can post an update here if I could fix this issue later. (Issue #117)
Thankyou for raising issue in the forum!

1 Like

Hi @gtsimonxu, we were able to identify the cause of the instability and fix it. Details on the solution are available here: Instability in gazebo from non-gazebo tuned xacros by hello-binit · Pull Request #122 · hello-robot/stretch_ros · GitHub

Here’s what the simulation looked like before:

You can simply pull the latest ‘noetic’ branch to get the fix:

roscd stretch_gazebo
git status #confirm you're on the 'noetic' branch
git pull

Here’s what it looks like after:

1 Like