DART 6.13.2
Loading...
Searching...
No Matches
dart::constraint::DefaultContactSurfaceHandler Class Reference

Default contact surface handler. More...

#include <ContactSurface.hpp>

Inheritance diagram for dart::constraint::DefaultContactSurfaceHandler:
dart::constraint::ContactSurfaceHandler

Public Member Functions

virtual ~DefaultContactSurfaceHandler ()=default
 
ContactSurfaceParams createParams (const collision::Contact &contact, size_t numContactsOnCollisionObject) const override
 Create parameters of the contact constraint.
 
ContactConstraintPtr createConstraint (collision::Contact &contact, size_t numContactsOnCollisionObject, double timeStep) const override
 Create the constraint that represents contact between two collision objects.
 
ContactSurfaceHandlerPtr getParent ()
 Get the optional parent handler (nullptr if none is set)
 
void setParent (ContactSurfaceHandlerPtr parent)
 Set the optional parent handler (ignored if parent.get() == this)
 

Static Protected Member Functions

static double computeFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computePrimaryFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computeSecondaryFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computePrimarySlipCompliance (const dynamics::ShapeNode *shapeNode)
 
static double computeSecondarySlipCompliance (const dynamics::ShapeNode *shapeNode)
 
static Eigen::Vector3d computeWorldFirstFrictionDir (const dynamics::ShapeNode *shapenode)
 
static double computeRestitutionCoefficient (const dynamics::ShapeNode *shapeNode)
 

Protected Attributes

ContactSurfaceHandlerPtr mParent
 The optional parent handler.
 

Friends

class ContactConstraint
 

Detailed Description

Default contact surface handler.

It chooses friction direction of the body with lower friction coefficient. It also adjusts slip compliance by mutliplying it with the number of contact points.

Constructor & Destructor Documentation

◆ ~DefaultContactSurfaceHandler()

virtual dart::constraint::DefaultContactSurfaceHandler::~DefaultContactSurfaceHandler ( )
virtualdefault

Member Function Documentation

◆ computeFrictionCoefficient()

double dart::constraint::DefaultContactSurfaceHandler::computeFrictionCoefficient ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computePrimaryFrictionCoefficient()

double dart::constraint::DefaultContactSurfaceHandler::computePrimaryFrictionCoefficient ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computePrimarySlipCompliance()

double dart::constraint::DefaultContactSurfaceHandler::computePrimarySlipCompliance ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computeRestitutionCoefficient()

double dart::constraint::DefaultContactSurfaceHandler::computeRestitutionCoefficient ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computeSecondaryFrictionCoefficient()

double dart::constraint::DefaultContactSurfaceHandler::computeSecondaryFrictionCoefficient ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computeSecondarySlipCompliance()

double dart::constraint::DefaultContactSurfaceHandler::computeSecondarySlipCompliance ( const dynamics::ShapeNode shapeNode)
staticprotected

◆ computeWorldFirstFrictionDir()

Eigen::Vector3d dart::constraint::DefaultContactSurfaceHandler::computeWorldFirstFrictionDir ( const dynamics::ShapeNode shapenode)
staticprotected

◆ createConstraint()

ContactConstraintPtr dart::constraint::DefaultContactSurfaceHandler::createConstraint ( collision::Contact contact,
size_t  numContactsOnCollisionObject,
double  timeStep 
) const
overridevirtual

Create the constraint that represents contact between two collision objects.

Reimplemented from dart::constraint::ContactSurfaceHandler.

◆ createParams()

ContactSurfaceParams dart::constraint::DefaultContactSurfaceHandler::createParams ( const collision::Contact contact,
size_t  numContactsOnCollisionObject 
) const
overridevirtual

Create parameters of the contact constraint.

This method should combine the collision properties of the two colliding bodies and write the combined result in the returned object. It is also passed the total number of contact points reported on the same collision body - that is useful e.g. for normalization of forces by the number of contact points.

Reimplemented from dart::constraint::ContactSurfaceHandler.

◆ getParent()

ContactSurfaceHandlerPtr dart::constraint::ContactSurfaceHandler::getParent ( )
inherited

Get the optional parent handler (nullptr if none is set)

◆ setParent()

void dart::constraint::ContactSurfaceHandler::setParent ( ContactSurfaceHandlerPtr  parent)
inherited

Set the optional parent handler (ignored if parent.get() == this)

Friends And Related Symbol Documentation

◆ ContactConstraint

friend class ContactConstraint
friend

Member Data Documentation

◆ mParent

ContactSurfaceHandlerPtr dart::constraint::ContactSurfaceHandler::mParent
protectedinherited

The optional parent handler.