Robotics StackExchange | Archived questions

Object falls off through ground plane instead of resting on it, when spawned in Gazebo

Hello, I am new to Gazebo/ROS and I am trying to spawn an object in Gazebo. I imported the .stl file through urdf and resized it (since the imported model was huge). After rescaling, I used the model editor to save the model.sdf and model.config files. Now when I use this model.sdf to spawn the object in gazebo using rosrun gazeros spawnmodel -sdf command, it falls off through the ground plane instead of resting on it.

Also, if I use the urdf file to spawn the object, the model keeps on floating.

Could anybody please let me know what the problem could be? Is this because of the way in which the model is exported to .stl?

Below is the link to the model.sdf file: C:\fakepath\model.sdf

Asked by Sam6 on 2017-07-24 14:29:11 UTC

Comments

Answers

Hello, I figured out the solution for object falling off through the ground plane. Basically in my model.sdf, I had resized the scale only for the visual and not for collision element. Now, I added the same scale to the collision element as well and it does collide with the ground plane. Following is the modified model.sdf : C:\fakepath\model.sdf

But, I am still facing the problem that the object keeps on floating and moving indefinitely.

Asked by Sam6 on 2017-07-25 10:10:15 UTC

Comments

it sounds like bad inertial values. The default values don't always work. The first thing to try is use realistic values.

Asked by iche033 on 2017-08-01 19:57:10 UTC

Thanks a lot! Bad inertial value was indeed the problem. I changed the default values to the ones provided in solidworks and the part perfectly rests on ground now!

Asked by Sam6 on 2017-08-07 12:38:03 UTC