Ask Your Question
0

Gazebo - joints control in position

asked 2012-11-29 10:27:43 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi Guys!

I'm new of gazebo world. I've build a little arm with 3 links and 2 joints. With the user interface i can assign a forse to a joint or a position too (in degree for example). I cannot find a way to do the same thing by the topics or services (i need to set position but i've find just this service: gazebo/apply_joint_effort but this don't help me)

Thank you!

edit retag flag offensive close merge delete

Comments

which version of ros/gazebo are you using?

Saphrosit gravatar imageSaphrosit ( 2012-11-29 10:50:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-11-29 11:02:38 -0500

Andrei Haidu gravatar image

Hi,

How about creating a plugin, where you can access the joints and apply forces on them? Here is a plugin example.

One possibility for getting the joint and applying a force on it would be something like:

physics::ModelPtr my_model = _parent;

physics::JointPtr my_joint = my_model->GetJoint("name_of_joint");

my_joint->SetForce(0, 3.0);

Cheers, Andrei

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-11-29 10:27:43 -0500

Seen: 1,509 times

Last updated: Nov 29 '12