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 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.
T | The scalar type, which must be one of the default scalars. |
#include <drake/multibody/plant/hydroelastic_contact_info.h>
Public Member Functions | |
const geometry::ContactSurface< T > & | contact_surface () const |
Returns a reference to the ContactSurface data structure. More... | |
const std::vector< HydroelasticQuadraturePointData< T > > & | quadrature_point_data () const |
Gets the intermediate data, including tractions, computed by the quadrature process. 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... | |
Construction | |
The constructors below adhere to a number of invariants. 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 these constructors to ensure that the parameters satisfy the documented invariants, see below. Similarly, the spatial force | |
HydroelasticContactInfo (const geometry::ContactSurface< T > *contact_surface, const SpatialForce< T > &F_Ac_W, std::vector< HydroelasticQuadraturePointData< T >> &&quadrature_point_data) | |
HydroelasticContactInfo (std::unique_ptr< geometry::ContactSurface< T >> contact_surface, const SpatialForce< T > &F_Ac_W, std::vector< HydroelasticQuadraturePointData< T >> &&quadrature_point_data) | |
This constructor takes ownership of contact_surface via a std::unique_ptr, instead of aliasing a pre-existing contact surface. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, | |
MoveAssignable. | |
HydroelasticContactInfo (const HydroelasticContactInfo &info) | |
Clones this data structure, making deep copies of all underlying data. More... | |
HydroelasticContactInfo & | operator= (const HydroelasticContactInfo &info) |
Clones this object in the same manner as the copy constructor. More... | |
HydroelasticContactInfo (HydroelasticContactInfo &&)=default | |
HydroelasticContactInfo & | operator= (HydroelasticContactInfo &&)=default |
HydroelasticContactInfo | ( | const geometry::ContactSurface< T > * | contact_surface, |
const SpatialForce< T > & | F_Ac_W, | ||
std::vector< HydroelasticQuadraturePointData< T >> && | quadrature_point_data | ||
) |
Constructs this structure using the given contact surface, traction field, and slip field. This constructor does not own the ContactSurface; it points to a ContactSurface that another owns, see contact_surface().
[in] | contact_surface | Contact surface between two geometries M and N, see geometry::ContactSurface::id_M() and geometry::ContactSurface::id_N(). |
[in] | F_Ac_W | Spatial 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() . |
[in] | quadrature_point_data | Hydroelastic field data at each quadrature point. Data must be provided in accordance to the convention that geometry M and N are attached to bodies A and B, respectively. Refer to HydroelasticQuadraturePointData for further details. |
HydroelasticContactInfo | ( | std::unique_ptr< geometry::ContactSurface< T >> | contact_surface, |
const SpatialForce< T > & | F_Ac_W, | ||
std::vector< HydroelasticQuadraturePointData< T >> && | quadrature_point_data | ||
) |
This constructor takes ownership of contact_surface
via a std::unique_ptr, instead of aliasing a pre-existing contact surface.
In all other respects, it is identical to the other overload that takes contact_surface
by raw pointer.
HydroelasticContactInfo | ( | const HydroelasticContactInfo< T > & | info | ) |
Clones this data structure, making deep copies of all underlying data.
|
default |
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.
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()
.
HydroelasticContactInfo& operator= | ( | const HydroelasticContactInfo< T > & | info | ) |
Clones this object in the same manner as the copy constructor.
|
default |
const std::vector<HydroelasticQuadraturePointData<T> >& quadrature_point_data | ( | ) | const |
Gets the intermediate data, including tractions, computed by the quadrature process.