0
$\begingroup$

Gazebo Answers logo

Why can't gazebo set torque to joint? I couldn't find "SetTorque" command for joints. Actually, I cannot understand what "setting force to joint" means. For example, SetForce(0, 1) means generating 1N to a given joint. Does that mean the joint can apply 1N to its loads no matter how big the loads are? I think joint effort should be described as torque...

The reason that I'm asking is that I'm simulating some passive torsional spring-damping joints. Thanks to the answers of this question (http://answers.gazebosim.org/question/217/simulating-springs/), I was able to design those by using

springjoint->SetForce(int _index, (rest_angle-current_angle)*stiffness);

However, stiffness unit of torsional spring is N-m/rad and the unit doesn't match with force. Please clarify what SetForce of joint exactly means in real physics?


Originally posted by Wonyoung on Gazebo Answers with karma: 37 on 2014-02-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Setting the force actually applies a torque to the joint.

Here is the API documentation, which is a bit unclear. We used the "Force" terminology in an effort to encompass both prismatic joints and rotational joints.

The underlying call (assuming you're using ODE) is dJointAddHingeTorque.


Originally posted by nkoenig with karma: 7676 on 2014-02-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Wonyoung on 2014-02-20:
Thank you for the clarification. I think it would be nice if you can add some comments about this in the API docs including the units (N, Nm and etc.). Actually, according to this question and its answer (http://answers.gazebosim.org/question/1850/how-to-use-torque-to-control-joint/), it is very easy to confuse like me.

Comment by Wonyoung on 2014-02-20:
By the way, during searching some answers to my question, I found "SetDamping" and it looks like doing what I'm doing with SetForce in the question. After searching in bitbucket.org/osrf/gazebo, the SetDamping seems to set CFM to joints. Is that right? According to API, it sounds like it is for applying just damping coefficient not with spring coefficient. It will be appreciated if you can clarify this. I always thank you for answering my questions.

Comment by hsu on 2014-02-20:
SetDamping makes the joint behave viscously damped. The coefficient for rotary joints will have units of torque / rate or (N m / (rad / s)). For prismatic joints, force / rate or (N / (m/s)).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.