Gazebo | Ignition | Community
Ask Your Question

Disable some physics effects

asked 2016-12-06 12:10:31 -0600

andrea.nisti gravatar image

Hello everyone,

I am new here and as well in gazebo environment, I need some help from you guys!

What I need to implement right now is a moving platform in Gazebo. I did the model (a simple square) and wrote a plugin which assign a constant vertical speed by the SetLinearVelocity method. This platform will be used as a landing target for a quadcopter, hence I an not interested in simulating its dynamics. I just need a moving landing spot!

I tried to land on it with a robot but the platform, at the moment of touchdown, starts spinning.

To fix that, I just set the relative pose (orientation) to zero and the problem disappears. Another issue arises, every simulation step i set the linear velocity right? Well when the robot touches the platform, the square just gets lower as if it is suffering from the robot weight.

Is there a simple way to disable those physics effects? I just need a square to which i can assign the position/velocity through a plugin and that's it.

Thanks in advance


edit retag flag offensive close merge delete

1 Answer

Sort by ┬╗ oldest newest most voted

answered 2016-12-07 11:36:22 -0600

chapulina gravatar image

updated 2016-12-12 10:35:38 -0600

I think that disabling some physics effects could be tricky, because you want contact between the platform and the quadcopter.

You could try making a prismatic joint between the platform and the world and control that joint (maybe with physics::JointController) rather than setting velocity:

  <joint name = "world_joint" type="prismatic">
      <xyz>1 0 0</xyz>

This way the platform movement is more constrained.

UPDATE (alternative):

An alternative just occurred to me. You can set your platform as a static model (i.e. it doesn't respond to the dynamics engine but does collide with other objects) and use SetWorldPose to change its position at every world iteration. You could modify the random velocity plugin from this tutorial to do that.

Regarding your question about time, check that tutorial for _info.simTime, which is the time in simulation.

edit flag offensive delete link more


Hello, sorry for my late answer but I was not at work. Thanks for your advice, as soon as I can i will try your update solution; what does exactly mean a "static" object inside the gazebo framework? A second question: since I am pretty new and I did not see any tutorial on this, how does gazebo manages time? How can I get a simulated time in second/milli etc.. ? Thanks a lot! Andrea Nistic├▓

andrea.nisti gravatar imageandrea.nisti ( 2016-12-12 04:55:48 -0600 )edit

Moved this to a comment, since it is not an answer ;)

chapulina gravatar imagechapulina ( 2016-12-12 10:30:39 -0600 )edit

I edited the question to answer your comments, hope that helps :)

chapulina gravatar imagechapulina ( 2016-12-12 10:36:11 -0600 )edit

Thanks a lot,I finally have a moving platform (oscillating with a frequency) in gazebo and looks fantastic! I really appreciate that ;) I guess you will hear from me again soon , Thanks again ;)

andrea.nisti gravatar imageandrea.nisti ( 2016-12-12 10:58:15 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-12-06 12:10:31 -0600

Seen: 1,388 times

Last updated: Dec 12 '16