Gazebo | Ignition | Community
Ask Your Question

apply torque to joint without accumulation

asked 2016-05-10 11:00:33 -0500

djou07 gravatar image


when applying force to a joint at every time step with setForce(), it adds the force to previous existing force without refreshing, i looked for a function that do not accumulate but i didn't found how can i solve this problem!

thanks in advance

edit retag flag offensive close merge delete


I don't think torques are accumulated via Joint::SetForce. Can you please share how you arrived at that conclusion? Thanks. Ref example for ode:

hsu gravatar imagehsu ( 2016-05-15 04:07:09 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-05-16 17:14:43 -0500

hsu gravatar image

as demonstrated in this test Join::SetForce is not cumulative, the moment you stop calling it the joint becomes passive.

edit flag offensive delete link more


thanks for your reply! I dont know really how it works, but according to this video I made when I apply at each time step 0.08 Nm to a wheel joint it go realy fast so I thought maybe it is the accumulation.

djou07 gravatar imagedjou07 ( 2016-05-17 09:45:03 -0500 )edit

0.08 is the troque that I caclulated with this equation: torque=length*force

djou07 gravatar imagedjou07 ( 2016-05-17 10:23:27 -0500 )edit

answered 2016-05-10 11:11:24 -0500

nkoenig gravatar image

You can try calling Link::SetForce and Link::SetTorque on each link connected to your joint.

edit flag offensive delete link more


Thank you! I tried this but it dont give me a realistic simulation... by the way, Link::SetTorque and Link::AddTorque give the same behaviour, probably one of them dont work...

djou07 gravatar imagedjou07 ( 2016-05-15 03:52:55 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2016-05-10 11:00:33 -0500

Seen: 475 times

Last updated: May 16 '16