gazebo part bouncing when spawned in the world.

asked 2023-07-10 13:04:55 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, i am new to gazebo, so i have some question for setting values for collision for the mesh file in gazebo. I am trying to spawn a mesh file into gazebo and used model editor to create a model using my mesh file. I am using default values for now, I changed restitution_coefficient value to 0 and also max_vel to 0. When i spawn my model the model starts swinging instead of coming to a stable position. Can someone tell what other value i need to change for it to land and go to a stable position.

SDF file created by model editor:C:\fakepath\model.sdf

edit retag flag offensive close merge delete


The model.sdf looks like just simple mesh collision with one link. It's hard to say more without knowing the mesh's shape. Sharing a screenshot of the model may help us understand more.

Do you mean the model oscillates on the ground, touching the ground left and right very quickly? So far I experienced that when scaling a box model in x or y direction so large. Adjusting some physics parameter may help improving that.

Veerachart gravatar imageVeerachart ( 2023-07-11 23:46:42 -0600 )edit

I was able to adjust the physics parameters to stop the model from oscillating. I used meshlab to find these parameters by following the tutorials in this link - The body is stable but its slowly drifts on the floor. I am uploading a the video of the part in gazebo to text

Jay0145 gravatar imageJay0145 ( 2023-07-14 09:09:32 -0600 )edit

I need permission to view the video.

Veerachart gravatar imageVeerachart ( 2023-07-19 03:45:49 -0600 )edit

Sorry for the confusion. I have changed the permissions for the link posted below for the video describing the problem of body moving in gazebo simulation.

Jay0145 gravatar imageJay0145 ( 2023-07-26 08:21:08 -0600 )edit

From the video, my guess is it's the stability of the collision calculation. Colliding with meshes can be hard to be accurate. There are quite a few parameters to change and see the performance: collision's max contacts, ODE's min depth (if you are using ODE) for example. ODE's solver parameter is also one thing to play with. You can view the contact points to see if they are stable enough.

Veerachart gravatar imageVeerachart ( 2023-07-26 20:24:48 -0600 )edit

Will decreasing the number of faces on the mesh file help with this problem

Jay0145 gravatar imageJay0145 ( 2023-07-31 11:43:36 -0600 )edit