Gazebo | Ignition | Community
Ask Your Question
1

Setting force to joint? not torque?

asked 2014-02-20 01:00:21 -0500

Wonyoung gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-20 11:31:54 -0500

nkoenig gravatar image

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.

edit flag offensive delete link more

Comments

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.

Wonyoung gravatar imageWonyoung ( 2014-02-20 11:39:11 -0500 )edit

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.

Wonyoung gravatar imageWonyoung ( 2014-02-20 11:45:50 -0500 )edit

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)).

hsu gravatar imagehsu ( 2014-02-20 11:56:43 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2014-02-20 01:00:21 -0500

Seen: 3,757 times

Last updated: Feb 20 '14