Drake
Drake C++ Documentation
HydroelasticContactInfo< T > Class Template Reference

Detailed Description

template<typename T>
class drake::multibody::HydroelasticContactInfo< T >

A class containing information regarding contact and contact response between two geometries attached to a pair of bodies.

This class provides the output from the Hydroelastic contact model and includes:

  • The shared contact surface between the two geometries, which includes the virtual pressures acting at every point on the contact surface.
  • The spatial force from the integrated tractions that is applied at the centroid of the contact surface.

The two geometries, denoted M and N (and obtainable via contact_surface().id_M() and contact_surface().id_N()) are attached to bodies A and B, respectively.

When T = Expression, the class is specialized to not contain any member data, because ContactSurface doesn't support Expression.

Template Parameters
TThe scalar type, which must be one of the default scalars.

#include <drake/multibody/plant/hydroelastic_contact_info.h>

Public Member Functions

 HydroelasticContactInfo (std::shared_ptr< const geometry::ContactSurface< T >> contact_surface, const SpatialForce< T > &F_Ac_W)
 Constructs this structure using the given contact surface and spatial force. More...
 
 HydroelasticContactInfo (const geometry::ContactSurface< T > *contact_surface, const SpatialForce< T > &F_Ac_W)
 (Advanced) Constructs by aliasing the given contact_surface, without any expensive reference counting. More...
 
 ~HydroelasticContactInfo ()
 
const geometry::ContactSurface< T > & contact_surface () const
 Returns a reference to the ContactSurface data structure. More...
 
const SpatialForce< T > & F_Ac_W () const
 Gets the spatial force applied on body A, at the centroid point C of the surface mesh M, and expressed in the world frame W. More...
 
Implements CopyConstructible, CopyAssignable
 HydroelasticContactInfo (const HydroelasticContactInfo &)
 
HydroelasticContactInfooperator= (const HydroelasticContactInfo &)
 

Constructor & Destructor Documentation

◆ HydroelasticContactInfo() [1/3]

HydroelasticContactInfo ( std::shared_ptr< const geometry::ContactSurface< T >>  contact_surface,
const SpatialForce< T > &  F_Ac_W 
)

Constructs this structure using the given contact surface and spatial force.

The geometry::ContactSurface defines contact between two geometries M and N (via contact_surface().id_M() and contact_surface().id_N(), respectively). HydroelasticContactInfo further associates geometries M and N with the bodies to which they are rigidly fixed, A and B, respectively. It is the responsibility of the caller of this constructor to ensure that the parameters satisfy the documented invariants, see below. Similarly, the spatial force F_Ac_W must be provided as indicated by the monogram notation in use, that is, it is the spatial force on body A, at the contact surface's centroid C, and expressed in the world frame.

Parameters
[in]contact_surfaceContact surface between two geometries M and N, see geometry::ContactSurface::id_M() and geometry::ContactSurface::id_N(). This must point to immutable data (i.e., data that will never change), and must not be nullptr.
[in]F_Ac_WSpatial force applied on body A, at contact surface centroid C, and expressed in the world frame W. The position p_WC of C in the world frame W can be obtained with ContactSurface::centroid().

◆ HydroelasticContactInfo() [2/3]

HydroelasticContactInfo ( const geometry::ContactSurface< T > *  contact_surface,
const SpatialForce< T > &  F_Ac_W 
)

(Advanced) Constructs by aliasing the given contact_surface, without any expensive reference counting.

It is the responsibility of the caller to ensure that the given contact_surface outlives this object. Copying or moving this object will result in a deep copy of the surface.

◆ HydroelasticContactInfo() [3/3]

◆ ~HydroelasticContactInfo()

Member Function Documentation

◆ contact_surface()

const geometry::ContactSurface<T>& contact_surface ( ) const

Returns a reference to the ContactSurface data structure.

Note that the mesh and gradient vector fields are expressed in the world frame.

◆ F_Ac_W()

const SpatialForce<T>& F_Ac_W ( ) const

Gets the spatial force applied on body A, at the centroid point C of the surface mesh M, and expressed in the world frame W.

The position p_WC of the centroid point C in the world frame W can be obtained with contact_surface().centroid().

◆ operator=()

HydroelasticContactInfo& operator= ( const HydroelasticContactInfo< T > &  )

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