Home | Tutorials | Wiki | Issues
Ask Your Question
0

Ways of applying force to a body in Gazebo

asked 2019-08-06 03:37:08 -0500

kumpakri gravatar image

updated 2019-08-06 03:41:02 -0500

In a Gazebo API there are many methods of applying force to a link.

  • AddForce
  • AddForceAtRelativePosition
  • AddForceAtWorldPosition
  • AddLinkForce
  • SetForce

  • AddRelativeTorque

  • AddTorque
  • SetTorque

What do they do? What is the difference between AddForce and SetForce? How is AddLinkForce different from the others?

Here is their specification:

virtual void AddForce ( const math::Vector3 & _force ) pure virtual Add a force to the body.

Parameters [in] _force Force to add. Implemented in BulletLink, SimbodyLink, ODELink, and DARTLink.

virtual void AddForceAtRelativePosition ( const math::Vector3 & _force, const math::Vector3 & _relPos ) pure virtual Add a force to the body at position expressed to the body's own frame of reference.

Parameters [in] _force Force to add. [in] _relPos Position on the link to add the force. Implemented in BulletLink, SimbodyLink, ODELink, and DARTLink.

virtual void AddForceAtWorldPosition ( const math::Vector3 & _force, const math::Vector3 & _pos ) pure virtual Add a force to the body using a global position.

Parameters [in] _force Force to add. [in] _pos Position in global coord frame to add the force. Implemented in BulletLink, SimbodyLink, ODELink, and DARTLink.

virtual void AddLinkForce ( const math::Vector3 & _force, const math::Vector3 & _offset = math::Vector3::Zero ) pure virtual Add a force expressed in the link frame.

Parameters [in] _force Direction vector expressed in the link frame. Each component corresponds to the force which will be added in that axis and the vector's magnitude corresponds to the total force. [in] _offset Offset position expressed in the link frame. It defaults to the link origin. Implemented in BulletLink, SimbodyLink, ODELink, and DARTLink.

virtual void AddRelativeTorque ( const math::Vector3 & _torque ) pure virtual Add a torque to the body, components are relative to the body's own frame of reference.

Parameters [in] _torque Torque value to add. Implemented in BulletLink, SimbodyLink, ODELink, and DARTLink.

virtual void AddTorque ( const math::Vector3 & _torque ) pure virtual Add a torque to the body.

virtual void SetForce ( const math::Vector3 & _force ) pure virtual Set the force applied to the body.

Parameters [in] _force Force value. Implemented in ODELink, BulletLink, DARTLink, and SimbodyLink.

virtual void SetTorque ( const math::Vector3 & _torque ) pure virtual Set the torque applied to the body.

Parameters [in] _torque Torque value. Implemented in ODELink, BulletLink, DARTLink, and SimbodyLink.

edit retag flag offensive close merge delete

Comments

1

This issue may have some helpful context: https://bitbucket.org/osrf/gazebo/iss...

chapulina gravatar imagechapulina ( 2019-08-06 12:53:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-29 03:47:27 -0500

What is the frame used in AddForce api?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-06 03:37:08 -0500

Seen: 63 times

Last updated: Sep 29