Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::rigidbody::SoftContactNode Class Referenceabstract

A point attached to a contact node, generally speaking a skin marker. More...

#include <SoftContactNode.h>

Inheritance diagram for BIORBD_NAMESPACE::rigidbody::SoftContactNode:
BIORBD_NAMESPACE::rigidbody::NodeSegment BIORBD_NAMESPACE::utils::Vector3d BIORBD_NAMESPACE::utils::Node BIORBD_NAMESPACE::rigidbody::SoftContactSphere

Public Member Functions

 SoftContactNode ()
 Construct a contact node.
 SoftContactNode (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z)
 Construct a contact node.
 SoftContactNode (const utils::Vector3d &other)
 Construct a contact node from another node.
 SoftContactNode (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z, const utils::String &name, const utils::String &parentName, int parentID)
 Construct a contact node.
 SoftContactNode (const utils::Vector3d &node, const utils::String &name, const utils::String &parentName, int parentID)
 Construct a contact node.
void DeepCopy (const SoftContactNode &other)
 Deep copy of the contact node.
virtual utils::SpatialVector computeForceAtOrigin (Joints &model, const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Get the force in a spatial vector at the origin of the world base coordinates.
virtual utils::Vector3d computeForce (const utils::Vector3d &x, const utils::Vector3d &dx, const utils::Vector3d &angularVelocity) const =0
 Get the force in a spatial vector at the center of mass of the underlying segment.
virtual utils::Vector3d applicationPoint (const utils::Vector3d &x) const =0
 Get the application point relative to the plane.
Public Member Functions inherited from BIORBD_NAMESPACE::rigidbody::NodeSegment
 NodeSegment ()
 Construct a segment node.
 NodeSegment (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z)
 Construct a segment node.
 NodeSegment (const utils::Vector3d &other)
 Construct a segment node from another node.
 NodeSegment (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z, const utils::String &name, const utils::String &parentName, bool isTechnical, bool isAnatomical, const utils::String &axesToRemove, int parentID)
 Construct a segment node.
 NodeSegment (const utils::Vector3d &node, const utils::String &name, const utils::String &parentName, bool isTechnical, bool isAnatomical, const utils::String &axesToRemove, int parentID)
 Construct a segment node.
NodeSegment DeepCopy () const
 Deep copy of the segment node.
void DeepCopy (const NodeSegment &other)
 Deep copy of the segment node.
void setValues (const NodeSegment &values)
 Set internal values of the node without changing other parameters.
bool isTechnical () const
 Return if node is technical.
bool isAnatomical () const
 Return if node is anatomical.
int parentId () const
 Return the parent index.
const std::vector< bool > & axesToRemove () const
 Accessor to axes to remove.
const std::vector< bool > axes () const
 A vector of bool which is the opposite of axesToRemove.
NodeSegment removeAxes () const
 To remove axis.
bool isAxisRemoved (size_t i) const
 Check if axis is removed.
bool isAxisKept (size_t i) const
 Check if axis is kept.
std::vector< int > availableAxesIndices () const
 Get all the indices of the axes to keep (X=0, Y=1, Z=2).
void addAxesToRemove (size_t axisNumber)
 Add an axis to remove.
void addAxesToRemove (const utils::String &axis)
 Add axis to remove.
void addAxesToRemove (const std::vector< size_t > &axes)
 Add multiple axes to remove.
void addAxesToRemove (const std::vector< utils::String > &axes)
 Add multiple axes to remove.
utils::String axesToRemoveAsString () const
 Return the axes to removed.
int nbAxesToRemove () const
 Return the number of axes to remove.
Public Member Functions inherited from BIORBD_NAMESPACE::utils::Vector3d
 Vector3d ()
 Construct 3D vector.
 Vector3d (const Scalar &x, const Scalar &y, const Scalar &z)
 Construct 3D vector.
 Vector3d (const Scalar &x, const Scalar &y, const Scalar &z, const String &name, const String &parentName)
 Construct a 3D vector.
 Vector3d (const Vector3d vec, const String &name, const String &parentName)
 Construct a 3D vector.
 Vector3d (const RigidBodyDynamics::Math::Vector3d &other)
 Construct a 3D vector from a Casadi 3D vector (drop the trailling 1).
 Vector3d (const RigidBodyDynamics::Math::VectorNd &other)
 Construct a 3D vector from a Casadi ND vector (drop the trailling 1).
 Vector3d (const RigidBodyDynamics::Math::Vector4d &other)
 Construct a 3D vector from an eigen 4D vector (drop the trailling 1).
Vector3d DeepCopy () const
 Deep copy of a 3D vector.
void DeepCopy (const Vector3d &other)
 Deep copy of a 3D vector into another 3D vector.
Vector3d applyRT (const RotoTrans &rt) const
 Apply a RotoTrans to the 3D vector.
void applyRT (const RotoTrans &rt)
 Apply a RotoTrans to the 3D vector.
void setPosition (const Vector3d &v)
 Set a new position.
Public Member Functions inherited from BIORBD_NAMESPACE::utils::Node
 Node ()
 Construct Node.
 Node (const Node &other)
 Construct Node from another node.
 Node (const String &name)
 Construct Node.
 Node (const String &name, const String &parentName)
 Construct Node.
virtual ~Node ()
 Destroy class properly.
void DeepCopy (const Node &other)
 Deep copy of the node in another node.
void setName (const String &name)
 Set the name of the node.
const String & name () const
 Return the name of the node.
const String & parent () const
 Return the parent name of the node.
void setParent (const String &name)
 Set the parent name of the node.
NODE_TYPE typeOfNode () const
 Return the type of node.

Protected Member Functions

void setType ()
 Set the type of the contact node.
Protected Member Functions inherited from BIORBD_NAMESPACE::utils::Vector3d
void setType ()
 Set the type Vector3d.

Protected Attributes

std::shared_ptr< std::pair< utils::Vector3d, utils::Vector3d > > m_contactPlane
Protected Attributes inherited from BIORBD_NAMESPACE::rigidbody::NodeSegment
std::shared_ptr< std::vector< bool > > m_axesRemoved
 The axes to remove.
std::shared_ptr< int > m_nbAxesToRemove
std::shared_ptr< bool > m_technical
 If a marker is a technical marker.
std::shared_ptr< bool > m_anatomical
 It marker is a anatomical marker.
std::shared_ptr< int > m_id
 The parent identification.
Protected Attributes inherited from BIORBD_NAMESPACE::utils::Node
std::shared_ptr< String > m_name
 The name of the node.
std::shared_ptr< String > m_parentName
 The parent name of the node.
std::shared_ptr< NODE_TYPE > m_typeOfNode
 The type of the node.

Detailed Description

A point attached to a contact node, generally speaking a skin marker.

Definition at line 23 of file SoftContactNode.h.

Constructor & Destructor Documentation

◆ SoftContactNode() [1/5]

rigidbody::SoftContactNode::SoftContactNode ( )

Construct a contact node.

Definition at line 14 of file SoftContactNode.cpp.

◆ SoftContactNode() [2/5]

rigidbody::SoftContactNode::SoftContactNode ( const utils::Scalar & x,
const utils::Scalar & y,
const utils::Scalar & z )

Construct a contact node.

Parameters
xX-Component of the node
yY-Component of the node
zZ-Component of the node

Definition at line 21 of file SoftContactNode.cpp.

◆ SoftContactNode() [3/5]

rigidbody::SoftContactNode::SoftContactNode ( const utils::Vector3d & other)

Construct a contact node from another node.

Parameters
otherThe other node

Definition at line 31 of file SoftContactNode.cpp.

◆ SoftContactNode() [4/5]

rigidbody::SoftContactNode::SoftContactNode ( const utils::Scalar & x,
const utils::Scalar & y,
const utils::Scalar & z,
const utils::String & name,
const utils::String & parentName,
int parentID )

Construct a contact node.

Parameters
xX-Component of the node
yY-Component of the node
zZ-Component of the node
nameThe name of the node
parentNameThe name of the parent
parentIDThe index of the parent contact

Definition at line 38 of file SoftContactNode.cpp.

◆ SoftContactNode() [5/5]

rigidbody::SoftContactNode::SoftContactNode ( const utils::Vector3d & node,
const utils::String & name,
const utils::String & parentName,
int parentID )

Construct a contact node.

Parameters
nodeThe position of the node
nameThe name of the node
parentNameThe name of the parent
parentIDThe index of the parent contact

Definition at line 60 of file SoftContactNode.cpp.

Member Function Documentation

◆ applicationPoint()

virtual utils::Vector3d BIORBD_NAMESPACE::rigidbody::SoftContactNode::applicationPoint ( const utils::Vector3d & x) const
pure virtual

Get the application point relative to the plane.

Parameters
xThe position of the contact in global reference frame
Returns
The application point

Implemented in BIORBD_NAMESPACE::rigidbody::SoftContactSphere.

◆ computeForce()

virtual utils::Vector3d BIORBD_NAMESPACE::rigidbody::SoftContactNode::computeForce ( const utils::Vector3d & x,
const utils::Vector3d & dx,
const utils::Vector3d & angularVelocity ) const
pure virtual

Get the force in a spatial vector at the center of mass of the underlying segment.

Parameters
xThe position of the contact in global reference frame
dxThe velocity of the contact in global reference frame
angularVelocityThe angular velocity of the contact in global reference frame
Returns
The Spatial vector

Implemented in BIORBD_NAMESPACE::rigidbody::SoftContactSphere.

◆ computeForceAtOrigin()

utils::SpatialVector rigidbody::SoftContactNode::computeForceAtOrigin ( Joints & model,
const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )
virtual

Get the force in a spatial vector at the origin of the world base coordinates.

Parameters
modelThe model
QThe Generalized Coordinates
QdotThe Generalized velocities
updateKinIf the kinematics should be updated
Returns
The Spatial vector

Definition at line 77 of file SoftContactNode.cpp.

◆ DeepCopy()

void rigidbody::SoftContactNode::DeepCopy ( const SoftContactNode & other)

Deep copy of the contact node.

Parameters
otherThe contact node to copy

Definition at line 71 of file SoftContactNode.cpp.

◆ setType()

void rigidbody::SoftContactNode::setType ( )
protectedvirtual

Set the type of the contact node.

Reimplemented from BIORBD_NAMESPACE::rigidbody::NodeSegment.

Reimplemented in BIORBD_NAMESPACE::rigidbody::SoftContactSphere.

Definition at line 118 of file SoftContactNode.cpp.

Member Data Documentation

◆ m_contactPlane

std::shared_ptr<std::pair<utils::Vector3d, utils::Vector3d> > BIORBD_NAMESPACE::rigidbody::SoftContactNode::m_contactPlane
protected

The contact plane that interface with the node in global reference frame

Definition at line 126 of file SoftContactNode.h.


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