Gazebo | Ignition | Community
Ask Your Question
0

Set model velocity via msgs in Gazebo 6

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

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
0

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

nkoenig gravatar image

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

~/WORLD_NAME/MODEL_NAME/LINK_NAME/wrench

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

Comments

1

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 -0600 )edit

I have been giving you advice based on the [ApplyForceTorque widget](https://bitbucket.org/osrf/gazebo/src/b60a5186d0008a915ccdc632f17df5d09ca33c24/gazebo/gui/ApplyWrenchDialog.cc?at=default&fileviewer=file-view-default). You might be better served looking at that code for examples.

nkoenig gravatar imagenkoenig ( 2015-12-11 21:56:34 -0600 )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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 419 times

Last updated: Dec 09 '15