Gazebo | Ignition | Community
Ask Your Question
0

Importing model to Gazebo 11 all links spawned at origin

asked 2023-05-30 20:31:36 -0500

airoverr gravatar image

Hello, I have made a custom gazebo model and was able to rig up all the links, joints and plugins in the model editor and save the model. However, every time I restart gazebo and insert my saved model, all the links would be spawned at the origin and not at the correct respective poses defined in the sdf file. (See image below).

image description

Once I edit model, all the links would move to the correct positions but I will need to save the model again and exit model editor for the links to stay in the right position. If I do not save the model before exiting model editor, the links would stay at the origin after exiting model editor. I am using Gazebo Classic 11 on Ubuntu 20.04. I have tried changing the sdf versions, and also tried using the relative_to function for the poses of the links, but to no avail. Any help is appreciated. Thank you very much in advance.

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-05-31 00:33:12 -0500

Veerachart gravatar image

I assume the model is not static. If you start the world in pause mode, or add the model while the world is paused, are the links in the model in the correct poses? Then when played, all the links go to the origin? If yes, that may mean your physics parameters in the model is not correct, and causing some inf or NaN in one of the links' poses. This can be caused by zero mass or inertia, for example, but there can be more possibilities.

edit flag offensive delete link more
0

answered 2023-05-31 21:45:31 -0500

airoverr gravatar image

Thank you very much for your help. You pointed me to the right problem. For those who are encountering the same problem, I was able to fix it by changing the physics parameters in the joints to:

<ode>
    <implicit_spring_damper>1</implicit_spring_damper>
</ode>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-05-30 20:31:36 -0500

Seen: 150 times

Last updated: May 31 '23