force_control_collection
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ForceColl::SurfaceContact Class Reference

Surface contact. More...

#include <Contact.h>

Inheritance diagram for ForceColl::SurfaceContact:
Inheritance graph
[legend]
Collaboration diagram for ForceColl::SurfaceContact:
Collaboration graph
[legend]

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SurfaceContact (const std::string &name, double fricCoeff, const std::vector< Eigen::Vector3d > &localVertices, const sva::PTransformd &pose, std::optional< sva::ForceVecd > maxWrench=std::nullopt)
 Constructor. More...
 
 SurfaceContact (const mc_rtc::Configuration &mcRtcConfig)
 Constructor. More...
 
virtual std::string type () const override
 Get type of contact. More...
 
void updateLocalVertices (const std::vector< Eigen::Vector3d > &localVertices)
 Update localVertices_ and localGraspMat_ according to the input pose. More...
 
virtual void updateGlobalVertices (const sva::PTransformd &pose) override
 Update graspMat_ and vertexWithRidgeList_ according to the input pose. More...
 
virtual void addToGUI (mc_rtc::gui::StateBuilder &gui, const std::vector< std::string > &category, double forceScale=constants::defaultForceScale, double fricPyramidScale=constants::defaultFricPyramidScale, const Eigen::VectorXd &wrenchRatio=Eigen::VectorXd::Zero(0)) override
 Add markers to GUI. More...
 
- Public Member Functions inherited from ForceColl::Contact
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Contact (const std::string &name, std::optional< sva::ForceVecd > maxWrench=std::nullopt)
 Constructor. More...
 
int ridgeNum () const
 Get the number of ridges. More...
 
sva::ForceVecd calcWrench (const Eigen::VectorXd &wrenchRatio, const Eigen::Vector3d &momentOrigin=Eigen::Vector3d::Zero()) const
 Calculate wrench. More...
 
sva::ForceVecd calcLocalWrench (const Eigen::VectorXd &wrenchRatio) const
 Calculate the local wrench. More...
 

Static Public Member Functions

static void loadVerticesMap (const mc_rtc::Configuration &mcRtcConfig)
 Load map of surface vertices in local coordinates. More...
 
- Static Public Member Functions inherited from ForceColl::Contact
static std::shared_ptr< ContactmakeSharedFromConfig (const mc_rtc::Configuration &mcRtcConfig)
 Make shared pointer from mc_rtc configuration. More...
 

Public Attributes

std::vector< Eigen::Vector3d > localVertices_
 List of local verticies. More...
 
- Public Attributes inherited from ForceColl::Contact
std::string name_
 Name of contact. More...
 
Eigen::Matrix< double, 6, Eigen::Dynamic > graspMat_
 Grasp matrix. More...
 
Eigen::Matrix< double, 6, Eigen::Dynamic > localGraspMat_
 Local grasp matrix. More...
 
std::shared_ptr< FrictionPyramidfricPyramid_
 Friction pyramid. More...
 
std::vector< VertexWithRidgevertexWithRidgeList_
 List of global vertex with ridges. More...
 
std::optional< sva::ForceVecd > maxWrench_
 Maximum wrench in local frame that can be accepted by this contact. More...
 

Static Public Attributes

static std::unordered_map< std::string, std::vector< Eigen::Vector3d > > verticesMap
 Map of surface vertices in local coordinates. More...
 

Detailed Description

Surface contact.

Definition at line 168 of file Contact.h.

Constructor & Destructor Documentation

◆ SurfaceContact() [1/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW ForceColl::SurfaceContact::SurfaceContact ( const std::string &  name,
double  fricCoeff,
const std::vector< Eigen::Vector3d > &  localVertices,
const sva::PTransformd &  pose,
std::optional< sva::ForceVecd >  maxWrench = std::nullopt 
)

Constructor.

Parameters
namename of contact
fricCoefffriction coefficient
localVerticessurface vertices in local coordinates
posepose of contact
maxWrenchmaximum wrench in local frame (absolute value) that can be accepted by this contact

◆ SurfaceContact() [2/2]

ForceColl::SurfaceContact::SurfaceContact ( const mc_rtc::Configuration &  mcRtcConfig)

Constructor.

Parameters
mcRtcConfigmc_rtc configuration

Member Function Documentation

◆ addToGUI()

virtual void ForceColl::SurfaceContact::addToGUI ( mc_rtc::gui::StateBuilder &  gui,
const std::vector< std::string > &  category,
double  forceScale = constants::defaultForceScale,
double  fricPyramidScale = constants::defaultFricPyramidScale,
const Eigen::VectorXd &  wrenchRatio = Eigen::VectorXd::Zero(0) 
)
overridevirtual

Add markers to GUI.

Parameters
guiGUI
categorycategory of GUI entries
forceScalescale of force markers (set non-positive for no visualization)
fricPyramidScalescale of friction pyramid markers (set non-positive for no visualization)
wrenchRatiowrench ratio of each ridge

Reimplemented from ForceColl::Contact.

◆ loadVerticesMap()

static void ForceColl::SurfaceContact::loadVerticesMap ( const mc_rtc::Configuration &  mcRtcConfig)
static

Load map of surface vertices in local coordinates.

Parameters
mcRtcConfigmc_rtc configuration

◆ type()

virtual std::string ForceColl::SurfaceContact::type ( ) const
inlineoverridevirtual

Get type of contact.

Implements ForceColl::Contact.

Definition at line 204 of file Contact.h.

◆ updateGlobalVertices()

virtual void ForceColl::SurfaceContact::updateGlobalVertices ( const sva::PTransformd &  pose)
overridevirtual

Update graspMat_ and vertexWithRidgeList_ according to the input pose.

Implements ForceColl::Contact.

◆ updateLocalVertices()

void ForceColl::SurfaceContact::updateLocalVertices ( const std::vector< Eigen::Vector3d > &  localVertices)

Update localVertices_ and localGraspMat_ according to the input pose.

Member Data Documentation

◆ localVertices_

std::vector<Eigen::Vector3d> ForceColl::SurfaceContact::localVertices_

List of local verticies.

Definition at line 180 of file Contact.h.

◆ verticesMap

std::unordered_map<std::string, std::vector<Eigen::Vector3d> > ForceColl::SurfaceContact::verticesMap
inlinestatic

Map of surface vertices in local coordinates.

Definition at line 177 of file Contact.h.


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