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

Grasp contact. More...

#include <Contact.h>

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

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW GraspContact (const std::string &name, double fricCoeff, const std::vector< sva::PTransformd > &localVertices, const sva::PTransformd &pose, std::optional< sva::ForceVecd > maxWrench=std::nullopt)
 Constructor. More...
 
 GraspContact (const mc_rtc::Configuration &mcRtcConfig)
 Constructor. More...
 
virtual std::string type () const override
 Get type of contact. More...
 
void updateLocalVertices (const std::vector< sva::PTransformd > &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 grasp 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< sva::PTransformd > 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< sva::PTransformd > > verticesMap
 Map of grasp vertices in local coordinates. More...
 

Detailed Description

Grasp contact.

Definition at line 230 of file Contact.h.

Constructor & Destructor Documentation

◆ GraspContact() [1/2]

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

Constructor.

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

◆ GraspContact() [2/2]

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

Constructor.

Parameters
mcRtcConfigmc_rtc configuration

Member Function Documentation

◆ addToGUI()

virtual void ForceColl::GraspContact::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::GraspContact::loadVerticesMap ( const mc_rtc::Configuration &  mcRtcConfig)
static

Load map of grasp vertices in local coordinates.

Parameters
mcRtcConfigmc_rtc configuration

◆ type()

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

Get type of contact.

Implements ForceColl::Contact.

Definition at line 266 of file Contact.h.

◆ updateGlobalVertices()

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

Update graspMat_ and vertexWithRidgeList_ according to the input pose.

Implements ForceColl::Contact.

◆ updateLocalVertices()

void ForceColl::GraspContact::updateLocalVertices ( const std::vector< sva::PTransformd > &  localVertices)

Update localVertices_ and localGraspMat_ according to the input pose.

Member Data Documentation

◆ localVertices_

std::vector<sva::PTransformd> ForceColl::GraspContact::localVertices_

List of local verticies.

Definition at line 242 of file Contact.h.

◆ verticesMap

std::unordered_map<std::string, std::vector<sva::PTransformd> > ForceColl::GraspContact::verticesMap
inlinestatic

Map of grasp vertices in local coordinates.

Definition at line 239 of file Contact.h.


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