Drake
ContactForce< T > Class Template Reference

The data for a single contact force applied to one body of a contacting pair. More...

#include <multibody/rigid_body_plant/contact_force.h>

## Public Member Functions

ContactForce ()
Default constructor. More...

ContactForce (const Vector3< T > &application_point, const Vector3< T > &normal, const Vector3< T > &force, const Vector3< T > &torque)
Fully-specified constructor. More...

ContactForce (const Vector3< T > &application_point, const Vector3< T > &normal, const Vector3< T > &force)
Zero-torque constructor. More...

ContactForce get_reaction_force () const
Returns a spatial force applied at the same application point with negative force and torque. More...

const Vector3< T > & get_application_point () const

const Vector3< T > & get_force () const

Vector3< Tget_normal_force () const
Computes the normal component of the translational force. More...

Vector3< Tget_tangent_force () const
Computes the tangential component of the translational force. More...

const Vector3< T > & get_torque () const

const Vector3< T > & get_normal () const

SpatialForce< Tget_spatial_force () const
This is a utility function for returning a compact representation of the contact force's overall spatial force: a pair of vectors in R3 representing a rotational and translational force. More...

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
ContactForce (const ContactForce &)=default

ContactForceoperator= (const ContactForce &)=default

ContactForce (ContactForce &&)=default

ContactForceoperator= (ContactForce &&)=default

## Detailed Description

### template<typename T> class drake::systems::ContactForce< T >

The data for a single contact force applied to one body of a contacting pair.

Ultimately, a contact force consists of an application point, a spatial force, and a unit vector. The spatial force includes:

• a translational force, that is a pure force applied at a point,
• a torque, the rotational force. This is not the same as the moment induced by the translational force. This torque can arise from a combination of different sources (e.g., torsional friction, the sum of various moments, etc.)

The unit normal indicates the normal direction of the translational force. Used to decompose the force into normal and tangential components. The normal is typically defined by the contact normal.

A ContactForce makes no assumptions about the frame in which it is defined except that the vectors representing application point location, contact normal, force, and torque are all expressed in a common frame, with the application point measured from the origin of that frame. Every external instantiation of ContactForce must make it clear which frame is being used.

Template Parameters
 T The scalar type. Must be a valid Eigen scalar.

Instantiated templates for the following ScalarTypes are provided:

• double

## Constructor & Destructor Documentation

 ContactForce ( const ContactForce< T > & )
default
 ContactForce ( ContactForce< T > && )
default
 ContactForce ( )

Default constructor.

All values are initialized to NaN.

Here is the caller graph for this function:

 ContactForce ( const Vector3< T > & application_point, const Vector3< T > & normal, const Vector3< T > & force, const Vector3< T > & torque )

Fully-specified constructor.

Parameters
 application_point The point at which the wrench is applied. normal The translational force's unit-length normal direction. force The translational force. torque The torque component.

Here is the call graph for this function:

 ContactForce ( const Vector3< T > & application_point, const Vector3< T > & normal, const Vector3< T > & force )

Zero-torque constructor.

This constructor sets the torque component to be zero.

Parameters
 application_point The point at which the wrench is applied. normal The translational force's unit-length normal direction. force The translational force.

Here is the call graph for this function:

## Member Function Documentation

 const Vector3& get_application_point ( ) const
inline

Here is the caller graph for this function:

 const Vector3& get_force ( ) const
inline

Here is the caller graph for this function:

 const Vector3& get_normal ( ) const
inline

Here is the caller graph for this function:

 Vector3 get_normal_force ( ) const
inline

Computes the normal component of the translational force.

Here is the caller graph for this function:

 ContactForce get_reaction_force ( ) const
inline

Returns a spatial force applied at the same application point with negative force and torque.

Here is the caller graph for this function:

 SpatialForce get_spatial_force ( ) const
inline

This is a utility function for returning a compact representation of the contact force's overall spatial force: a pair of vectors in R3 representing a rotational and translational force.

The rotational force does not necessarily include an r X f moment term. It is simply the pure torque that was provided at initialization time. Ultimately, the responsibility for computing this moment term belongs to the portion of the code which knows the origin around which the moment is generated.

Returns
the resultant spatial force.

Here is the caller graph for this function:

 Vector3 get_tangent_force ( ) const
inline

Computes the tangential component of the translational force.

 const Vector3& get_torque ( ) const
inline
 ContactForce& operator= ( const ContactForce< T > & )
default
 ContactForce& operator= ( ContactForce< T > && )
default

The documentation for this class was generated from the following files: