Gazebo | Ignition | Community
Ask Your Question

Set model velocity via msgs in Gazebo 6

asked 2015-12-09 14:21:20 -0500

alexorex gravatar image

I need to move a model smoothly from keyboard. For this I need to set (maybe, learn) velocity of a model via messages. In Messages API I found only static pose arguments. In a few places on the internet I saw some comments about "geometrymsgs/Twist" topic, but they look outdated as in Gazebo 6 there isn't anything similar.

So how Can I do this without any plugins, using just messages?

Thanks for the feedback!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-09 19:59:09 -0500

nkoenig gravatar image

You can apply a wrench to a link using a topic with the following format:


Replace WORLD_NAME with the name of the world (usually default)

Replace MODEL_NAME with the name of the model.

Replace LINK_NAME with the name of the link on which to apply the force.

edit flag offensive delete link more



Thanks, it worked! Now maybe you know where I can publish the WrenchStamped messages, it would be much more effective? ".../wrench_stamped" didn't work. And how to stop the movement, because applying the same force backwards seems irrational? And, optionally, how to learn/limit the velocity of the model?

alexorex gravatar imagealexorex ( 2015-12-10 14:50:23 -0500 )edit

I have been giving you advice based on the [ApplyForceTorque widget]( You might be better served looking at that code for examples.

nkoenig gravatar imagenkoenig ( 2015-12-11 21:56:34 -0500 )edit

From the file I learned that the values of Wrench can be in the thousands, unlike joints force in my previous experience, Now It works! Thank you again!

alexorex gravatar imagealexorex ( 2015-12-14 07:09:52 -0500 )edit

Question Tools

1 follower


Asked: 2015-12-09 14:10:56 -0500

Seen: 417 times

Last updated: Dec 09 '15