Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::rigidbody::SoftContactSphere Class Reference

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

#include <SoftContactSphere.h>

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

Public Member Functions

 SoftContactSphere ()
 Construct a contact node.
 SoftContactSphere (const rigidbody::SoftContactNode &other)
 Construct a contact node.
 SoftContactSphere (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z, const utils::Scalar &radius, const utils::Scalar &stiffness, const utils::Scalar &damping, const utils::Scalar &muStatic, const utils::Scalar &muDynamic, const utils::Scalar &muViscous)
 Construct a contact node.
 SoftContactSphere (const utils::Vector3d &other, const utils::Scalar &radius, const utils::Scalar &stiffness, const utils::Scalar &damping, const utils::Scalar &muStatic, const utils::Scalar &muDynamic, const utils::Scalar &muViscous)
 Construct a contact node from another node.
 SoftContactSphere (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z, const utils::Scalar &radius, const utils::Scalar &stiffness, const utils::Scalar &damping, const utils::Scalar &muStatic, const utils::Scalar &muDynamic, const utils::Scalar &muViscous, const utils::String &name, const utils::String &parentName, int parentID)
 Construct a contact node.
 SoftContactSphere (const utils::Vector3d &node, const utils::Scalar &radius, const utils::Scalar &stiffness, const utils::Scalar &damping, const utils::Scalar &muStatic, const utils::Scalar &muDynamic, const utils::Scalar &muViscous, const utils::String &name, const utils::String &parentName, int parentID)
 Construct a contact node.
SoftContactSphere DeepCopy () const
 Deep copy of the contact node.
void DeepCopy (const SoftContactSphere &other)
 Deep copy of the contact node.
void setRadius (const utils::Scalar &radius)
 Set a new value for the radius.
utils::Scalar radius () const
 Return the value of the radius.
void setStiffness (const utils::Scalar &stiffness)
 Set a new value for the stiffness.
utils::Scalar stiffness () const
 Return the value of the stiffness.
void setDamping (const utils::Scalar &damping)
 Set a new value for the damping.
utils::Scalar damping () const
 Return the value of the damping.
void setMuStatic (const utils::Scalar &muStatic)
 Set a new value for the muStatic.
utils::Scalar muStatic () const
 Return the value of the muStatic.
void setMuDynamic (const utils::Scalar &muDynamic)
 Set a new value for the muDynamic.
utils::Scalar muDynamic () const
 Return the value of the muDynamic.
void setMuViscous (const utils::Scalar &muViscous)
 Set a new value for the muViscous.
utils::Scalar muViscous () const
 Return the value of the muViscous.
void setTransitionVelocity (const utils::Scalar &transitionVelocity)
 Set a new value for the transitionVelocity.
utils::Scalar transitionVelocity () const
 Return the value of the transitionVelocity.
virtual utils::Vector3d computeForce (const utils::Vector3d &x, const utils::Vector3d &dx, const utils::Vector3d &angularVelocity) const
 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
 Get the application point relative to the plane.
Public Member Functions inherited from BIORBD_NAMESPACE::rigidbody::SoftContactNode
 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.
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< utils::Scalar > m_radius
 The radius of the contact sphere.
std::shared_ptr< utils::Scalar > m_stiffness
 The stiffness of the contact sphere.
std::shared_ptr< utils::Scalar > m_damping
 The damping factor of the contact sphere.
std::shared_ptr< utils::Scalar > m_muStatic
 Static coefficient of friction (mu).
std::shared_ptr< utils::Scalar > m_muDynamic
 Dynamic coefficient of friction (mu).
std::shared_ptr< utils::Scalar > m_muViscous
 Vicous coefficient of friction (mu).
std::shared_ptr< utils::Scalar > m_transitionVelocity
Protected Attributes inherited from BIORBD_NAMESPACE::rigidbody::SoftContactNode
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 15 of file SoftContactSphere.h.

Constructor & Destructor Documentation

◆ SoftContactSphere() [1/6]

rigidbody::SoftContactSphere::SoftContactSphere ( )

Construct a contact node.

Definition at line 8 of file SoftContactSphere.cpp.

◆ SoftContactSphere() [2/6]

rigidbody::SoftContactSphere::SoftContactSphere ( const rigidbody::SoftContactNode & other)

Construct a contact node.

Parameters
otherThe contact node to copy

Definition at line 20 of file SoftContactSphere.cpp.

◆ SoftContactSphere() [3/6]

rigidbody::SoftContactSphere::SoftContactSphere ( const utils::Scalar & x,
const utils::Scalar & y,
const utils::Scalar & z,
const utils::Scalar & radius,
const utils::Scalar & stiffness,
const utils::Scalar & damping,
const utils::Scalar & muStatic,
const utils::Scalar & muDynamic,
const utils::Scalar & muViscous )

Construct a contact node.

Parameters
xX-Component of the node
yY-Component of the node
zZ-Component of the node
radiusThe radius of the sphere
stiffnessThe stiffness of the contact sphere
dampingThe damping factor of the contact sphere
muStaticStatic friction coefficient
muDynamicDynamic friction coefficient
muViscousViscous friction coefficient

Definition at line 37 of file SoftContactSphere.cpp.

◆ SoftContactSphere() [4/6]

rigidbody::SoftContactSphere::SoftContactSphere ( const utils::Vector3d & other,
const utils::Scalar & radius,
const utils::Scalar & stiffness,
const utils::Scalar & damping,
const utils::Scalar & muStatic,
const utils::Scalar & muDynamic,
const utils::Scalar & muViscous )

Construct a contact node from another node.

Parameters
otherThe other node
radiusThe radius of the sphere
stiffnessThe stiffness of the contact sphere
dampingThe damping factor of the contact sphere
muStaticStatic friction coefficient
muDynamicDynamic friction coefficient
muViscousViscous friction coefficient

Definition at line 58 of file SoftContactSphere.cpp.

◆ SoftContactSphere() [5/6]

rigidbody::SoftContactSphere::SoftContactSphere ( const utils::Scalar & x,
const utils::Scalar & y,
const utils::Scalar & z,
const utils::Scalar & radius,
const utils::Scalar & stiffness,
const utils::Scalar & damping,
const utils::Scalar & muStatic,
const utils::Scalar & muDynamic,
const utils::Scalar & muViscous,
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
radiusThe radius of the sphere
stiffnessThe stiffness of the contact sphere
dampingThe damping factor of the contact sphere
muStaticStatic friction coefficient
muDynamicDynamic friction coefficient
muViscousViscous friction coefficient
nameThe name of the node
parentNameThe name of the parent
parentIDThe index of the parent contact

Definition at line 77 of file SoftContactSphere.cpp.

◆ SoftContactSphere() [6/6]

rigidbody::SoftContactSphere::SoftContactSphere ( const utils::Vector3d & node,
const utils::Scalar & radius,
const utils::Scalar & stiffness,
const utils::Scalar & damping,
const utils::Scalar & muStatic,
const utils::Scalar & muDynamic,
const utils::Scalar & muViscous,
const utils::String & name,
const utils::String & parentName,
int parentID )

Construct a contact node.

Parameters
nodeThe position of the node
radiusThe radius of the sphere
stiffnessThe stiffness of the contact sphere
dampingThe damping factor of the contact sphere
muStaticStatic friction coefficient
muDynamicDynamic friction coefficient
muViscousViscous friction coefficient
nameThe name of the node
parentNameThe name of the parent
parentIDThe index of the parent contact

Definition at line 101 of file SoftContactSphere.cpp.

Member Function Documentation

◆ applicationPoint()

utils::Vector3d rigidbody::SoftContactSphere::applicationPoint ( const utils::Vector3d & x) const
virtual

Get the application point relative to the plane.

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

Implements BIORBD_NAMESPACE::rigidbody::SoftContactNode.

Definition at line 251 of file SoftContactSphere.cpp.

◆ computeForce()

utils::Vector3d rigidbody::SoftContactSphere::computeForce ( const utils::Vector3d & x,
const utils::Vector3d & dx,
const utils::Vector3d & angularVelocity ) const
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 segment in global reference frame with respect to the global frame.
Returns
The Spatial vector

Implements BIORBD_NAMESPACE::rigidbody::SoftContactNode.

Definition at line 198 of file SoftContactSphere.cpp.

◆ damping()

utils::Scalar rigidbody::SoftContactSphere::damping ( ) const

Return the value of the damping.

Returns
The value of the damping

Definition at line 159 of file SoftContactSphere.cpp.

◆ DeepCopy() [1/2]

rigidbody::SoftContactSphere rigidbody::SoftContactSphere::DeepCopy ( ) const

Deep copy of the contact node.

Returns
A deep copy of the contact node

Definition at line 123 of file SoftContactSphere.cpp.

◆ DeepCopy() [2/2]

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

Deep copy of the contact node.

Parameters
otherThe contact node to copy

Definition at line 129 of file SoftContactSphere.cpp.

◆ muDynamic()

utils::Scalar rigidbody::SoftContactSphere::muDynamic ( ) const

Return the value of the muDynamic.

Returns
The value of the muDynamic

Definition at line 176 of file SoftContactSphere.cpp.

◆ muStatic()

utils::Scalar rigidbody::SoftContactSphere::muStatic ( ) const

Return the value of the muStatic.

Returns
The value of the muStatic

Definition at line 167 of file SoftContactSphere.cpp.

◆ muViscous()

utils::Scalar rigidbody::SoftContactSphere::muViscous ( ) const

Return the value of the muViscous.

Returns
The value of the muViscous

Definition at line 185 of file SoftContactSphere.cpp.

◆ radius()

utils::Scalar rigidbody::SoftContactSphere::radius ( ) const

Return the value of the radius.

Returns
The value of the radius

Definition at line 144 of file SoftContactSphere.cpp.

◆ setDamping()

void rigidbody::SoftContactSphere::setDamping ( const utils::Scalar & damping)

Set a new value for the damping.

Parameters
dampingThe new value for the damping

Definition at line 155 of file SoftContactSphere.cpp.

◆ setMuDynamic()

void rigidbody::SoftContactSphere::setMuDynamic ( const utils::Scalar & muDynamic)

Set a new value for the muDynamic.

Parameters
muDynamicThe new value for the muDynamic

Definition at line 171 of file SoftContactSphere.cpp.

◆ setMuStatic()

void rigidbody::SoftContactSphere::setMuStatic ( const utils::Scalar & muStatic)

Set a new value for the muStatic.

Parameters
muStaticThe new value for the muStatic

Definition at line 163 of file SoftContactSphere.cpp.

◆ setMuViscous()

void rigidbody::SoftContactSphere::setMuViscous ( const utils::Scalar & muViscous)

Set a new value for the muViscous.

Parameters
muViscousThe new value for the muViscous

Definition at line 180 of file SoftContactSphere.cpp.

◆ setRadius()

void rigidbody::SoftContactSphere::setRadius ( const utils::Scalar & radius)

Set a new value for the radius.

Parameters
radiusThe new value for the radius

Definition at line 140 of file SoftContactSphere.cpp.

◆ setStiffness()

void rigidbody::SoftContactSphere::setStiffness ( const utils::Scalar & stiffness)

Set a new value for the stiffness.

Parameters
stiffnessThe new value for the stiffness

Definition at line 146 of file SoftContactSphere.cpp.

◆ setTransitionVelocity()

void rigidbody::SoftContactSphere::setTransitionVelocity ( const utils::Scalar & transitionVelocity)

Set a new value for the transitionVelocity.

Parameters
transitionVelocityThe new value for the transitionVelocity

Definition at line 189 of file SoftContactSphere.cpp.

◆ setType()

void rigidbody::SoftContactSphere::setType ( )
protectedvirtual

Set the type of the contact node.

Reimplemented from BIORBD_NAMESPACE::rigidbody::SoftContactNode.

Definition at line 260 of file SoftContactSphere.cpp.

◆ stiffness()

utils::Scalar rigidbody::SoftContactSphere::stiffness ( ) const

Return the value of the stiffness.

Returns
The value of the stiffness

Definition at line 151 of file SoftContactSphere.cpp.

◆ transitionVelocity()

utils::Scalar rigidbody::SoftContactSphere::transitionVelocity ( ) const

Return the value of the transitionVelocity.

Returns
The value of the transitionVelocity

Definition at line 194 of file SoftContactSphere.cpp.

Member Data Documentation

◆ m_damping

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_damping
protected

The damping factor of the contact sphere.

Definition at line 252 of file SoftContactSphere.h.

◆ m_muDynamic

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_muDynamic
protected

Dynamic coefficient of friction (mu).

Definition at line 257 of file SoftContactSphere.h.

◆ m_muStatic

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_muStatic
protected

Static coefficient of friction (mu).

Definition at line 255 of file SoftContactSphere.h.

◆ m_muViscous

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_muViscous
protected

Vicous coefficient of friction (mu).

Definition at line 259 of file SoftContactSphere.h.

◆ m_radius

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_radius
protected

The radius of the contact sphere.

Definition at line 248 of file SoftContactSphere.h.

◆ m_stiffness

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_stiffness
protected

The stiffness of the contact sphere.

Definition at line 250 of file SoftContactSphere.h.

◆ m_transitionVelocity

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SoftContactSphere::m_transitionVelocity
protected

Transition velocity factor of Hunt-Crossley's model

Definition at line 261 of file SoftContactSphere.h.


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