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

Revision history [back]

click to hide/show revision 1
initial version

Joint::GetForce() has not been implemented, you will get back 0 in all instances. It might be worth a new ticket/patch to add an internal variable in each joint object to keep track of total forces added via ODEJoint::SetForce(...) calls and return the value when GetForce() is called.

Alternatively, you can also get back ODE's computed total force and torque applied on a body by calling ODEJoint::GetBodyForce(unsigned int) and ODEJoint::GetBodyTorque(unsigned int). The returned wrench will be the total force/torque applied to the body at each time step update due to gravity and constraints. Set <provideFeedback>True</provideFeedback> flag in the joint definition XML block to enable this feature. Please note that the returned value may need to be time averaged to be useful if the simulation is jittery.