Is it possible to dynamically change a model's "static" parameter e.g. using a plugin?

asked 2020-10-08 18:07:41 -0500

shonig gravatar image

I am simulating a robot that is meant to anchor itself to the environment. I am wondering if it would be possible to make the base link of the robot static, dynamically (e.g. when a condition is met in the simulation), or if anyone would have any recommendations on how to achieve this result?

Edit: I was looking through related questions and I think I found what I was looking for: SetLinkStatic()

However, when I use this command in a plugin it doesn't quite seem to work as expected... If I select the robot in Gazebo, the "is_static" tag is checked, as expected. However, the model is still affected by gravity and falls the the ground... Disabling gravity using SetGravityMode(false) also doesn't seem to help.

Conversely, if I set a model to static directly in the .SDF, it can "float", unaffected by gravity. Why does SetStatic()

Any help would be greatly appreciated!

edit retag flag offensive close merge delete


@shonig Any update on this? I would be interested in the solution too.

Basti gravatar imageBasti ( 2021-03-10 04:01:45 -0500 )edit