ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Gazebo - joints control in position

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

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 image Saphrosit  ( 2012-11-29 10:50:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Question Tools

Stats

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

Seen: 2,864 times

Last updated: Nov 29 '12