Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::internal_forces::ligaments::Ligament Class Referenceabstract

Base class of all ligament. More...

#include <Ligament.h>

Inheritance diagram for BIORBD_NAMESPACE::internal_forces::ligaments::Ligament:
BIORBD_NAMESPACE::internal_forces::Compound BIORBD_NAMESPACE::internal_forces::ligaments::LigamentConstant BIORBD_NAMESPACE::internal_forces::ligaments::LigamentSpringLinear BIORBD_NAMESPACE::internal_forces::ligaments::LigamentSpringSecondOrder

Public Member Functions

 Ligament ()
 Construct a ligament.
 Ligament (const utils::String &name, const internal_forces::Geometry &position, const LigamentCharacteristics &characteristics)
 Construct a ligament.
 Ligament (const utils::String &name, const internal_forces::Geometry &position, const LigamentCharacteristics &characteristics, const internal_forces::PathModifiers &pathModifiers)
 Construct a ligament.
 Ligament (const Ligament &other)
 Construct a ligament from another ligament.
 Ligament (const std::shared_ptr< Ligament > other)
 Construct a ligament from another ligament.
virtual ~Ligament ()
 Destroy class properly.
void DeepCopy (const Ligament &other)
 Deep copy of a ligament in new ligament.
const utils::Scalar & length (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateLigamentKinematics=true)
 Get the length of the ligament.
const utils::Scalar & velocity (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateLigamentKinematics=true)
 Return the velocity of the ligament.
void updateOrientations (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q)
 Update the position of the origin and insertion positions of the ligament.
void updateOrientations (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot)
 Update the position of the origin and insertion nodes of the ligament.
void updateOrientations (std::vector< utils::Vector3d > &ligamentPointsInGlobal, utils::Matrix &jacoPointsInGlobal)
 Update by hand the position of the origin and insertion nodes of the ligament.
void updateOrientations (std::vector< utils::Vector3d > &ligamentPointsInGlobal, utils::Matrix &jacoPointsInGlobal, const rigidbody::GeneralizedVelocity &Qdot)
 Update by hand the position of the origin and insertion nodes of the ligament.
void setPosition (const internal_forces::Geometry &positions)
 Set the position of all the points attached to the ligament (0 being the origin).
const internal_forces::Geometry & position () const
 Return the position of all the points attached to the ligament (0 being the origin).
void setCharacteristics (const LigamentCharacteristics &characteristics)
 Set the ligament characteristics.
const LigamentCharacteristics & characteristics () const
 Return the ligament characteristics.
const std::vector< utils::Vector3d > & ligamentsPointsInGlobal (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateLigamentKinematics=true)
 Return the ligament points in global reference frame.
const std::vector< utils::Vector3d > & ligamentsPointsInGlobal () const
 Return the previously computed ligament points in global reference frame.
virtual const utils::Scalar & force (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateLigamentKinematics=true)
 Return the computed force norm.
virtual const utils::Scalar & force (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateLigamentKinematics=true)
 Return the computed force norm.
virtual const utils::Scalar & force ()
 Return the computed force norm. The ligament orientation had to be computed before calling this function.
LIGAMENT_TYPE type () const
 Return the type of the ligament.
const utils::Scalar & Fl ()
 Return the Force-Length of the passive element.
const utils::Scalar & damping ()
 Return the ligament damping (spring force).
void computeDamping ()
 Compute the ligament damping.
Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::Compound
 Compound ()
 Construct muscle compound.
 Compound (const utils::String &name)
 Construct compound.
 Compound (const utils::String &name, const internal_forces::PathModifiers &pathModifiers)
 Construct compound.
 Compound (const Compound &other)
 Construct compound from another muscle.
 Compound (const std::shared_ptr< Compound > other)
 Construct compound from another compound.
virtual ~Compound ()
 Destroy class properly.
void DeepCopy (const Compound &other)
 Deep copy of a compound.
void setName (const utils::String &name)
 Set the name of a muscle.
const utils::String & name () const
 Return the name of the muscle.
const internal_forces::PathModifiers & pathModifier ()
 Return the path modifier.
void addPathObject (utils::Vector3d &wrap)
 Add a path modifier object.

Protected Member Functions

virtual void computeForce ()
 Compute the force of the ligament.
virtual void setType ()
 Set the type of ligament.
virtual utils::Scalar getForce ()
 Function allowing modification of the way the force is computed in computeForce().
virtual void computeFl ()=0
 Compute the Force-length.

Protected Attributes

std::shared_ptr< internal_forces::Geometry > m_position
std::shared_ptr< LIGAMENT_TYPE > m_type
 The type of the ligament.
std::shared_ptr< LigamentCharacteristics > m_characteristics
 The ligament characteristics.
std::shared_ptr< utils::Scalar > m_damping
 The ligament damping term.
std::shared_ptr< utils::Scalar > m_Fl
 Force-Length.
Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::Compound
std::shared_ptr< utils::String > m_name
 The name of the muscle.
std::shared_ptr< internal_forces::PathModifiers > m_pathChanger
 The set of path modifiers.
std::shared_ptr< utils::Scalar > m_force
 The last computed force.

Detailed Description

Base class of all ligament.

Definition at line 26 of file Ligament.h.

Constructor & Destructor Documentation

◆ Ligament() [1/5]

internal_forces::ligaments::Ligament::Ligament ( )

Construct a ligament.

Definition at line 20 of file Ligament.cpp.

◆ Ligament() [2/5]

internal_forces::ligaments::Ligament::Ligament ( const utils::String & name,
const internal_forces::Geometry & position,
const LigamentCharacteristics & characteristics )

Construct a ligament.

Parameters
nameName of the ligament
positionPosition of the origin/insertion
characteristicsligament characteristics from an initial state

Definition at line 36 of file Ligament.cpp.

◆ Ligament() [3/5]

internal_forces::ligaments::Ligament::Ligament ( const utils::String & name,
const internal_forces::Geometry & position,
const LigamentCharacteristics & characteristics,
const internal_forces::PathModifiers & pathModifiers )

Construct a ligament.

Parameters
nameName of the ligament
positionPosition of the origin/insertion
characteristicsligament characteristics from an initial state
pathModifiersThe path modifiers

Definition at line 53 of file Ligament.cpp.

◆ Ligament() [4/5]

internal_forces::ligaments::Ligament::Ligament ( const Ligament & other)

Construct a ligament from another ligament.

Parameters
otherThe other ligament

Definition at line 71 of file Ligament.cpp.

◆ Ligament() [5/5]

internal_forces::ligaments::Ligament::Ligament ( const std::shared_ptr< Ligament > other)

Construct a ligament from another ligament.

Parameters
otherThe other ligament

Definition at line 80 of file Ligament.cpp.

◆ ~Ligament()

internal_forces::ligaments::Ligament::~Ligament ( )
virtual

Destroy class properly.

Definition at line 89 of file Ligament.cpp.

Member Function Documentation

◆ characteristics()

const internal_forces::ligaments::LigamentCharacteristics & internal_forces::ligaments::Ligament::characteristics ( ) const

Return the ligament characteristics.

Returns
The ligament characteristics

Definition at line 237 of file Ligament.cpp.

◆ computeDamping()

void internal_forces::ligaments::Ligament::computeDamping ( )

Compute the ligament damping.

Definition at line 251 of file Ligament.cpp.

◆ computeFl()

virtual void BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::computeFl ( )
protectedpure virtual

◆ computeForce()

void internal_forces::ligaments::Ligament::computeForce ( )
protectedvirtual

Compute the force of the ligament.

Definition at line 207 of file Ligament.cpp.

◆ damping()

const utils::Scalar & internal_forces::ligaments::Ligament::damping ( )

Return the ligament damping (spring force).

Returns
The ligament damping

Definition at line 246 of file Ligament.cpp.

◆ DeepCopy()

void internal_forces::ligaments::Ligament::DeepCopy ( const Ligament & other)

Deep copy of a ligament in new ligament.

Parameters
otherThe ligament to copy

Definition at line 93 of file Ligament.cpp.

◆ Fl()

const utils::Scalar & internal_forces::ligaments::Ligament::Fl ( )

Return the Force-Length of the passive element.

Returns
The Force-Length of the passive element

Definition at line 241 of file Ligament.cpp.

◆ force() [1/3]

const utils::Scalar & internal_forces::ligaments::Ligament::force ( )
virtual

Return the computed force norm. The ligament orientation had to be computed before calling this function.

Returns
The computed force

Reimplemented from BIORBD_NAMESPACE::internal_forces::Compound.

Definition at line 200 of file Ligament.cpp.

◆ force() [2/3]

const utils::Scalar & internal_forces::ligaments::Ligament::force ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
bool updateLigamentKinematics = true )
virtual

Return the computed force norm.

Parameters
updatedModelThe joint model updated to the proper kinematic level
QThe generalized coordinates of the model
updateLigamentKinematicsIf the kinematic parameters of the ligament should be updated
Returns
The computed force

Definition at line 187 of file Ligament.cpp.

◆ force() [3/3]

const utils::Scalar & internal_forces::ligaments::Ligament::force ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
bool updateLigamentKinematics = true )
virtual

Return the computed force norm.

Parameters
updatedModelThe joints model
QThe generalized coordinates of the model
QdotThe generalized velocities of the model
updateLigamentKinematicsIf the kinematic parameters of the ligament should be updated
Returns
The computed force

Definition at line 173 of file Ligament.cpp.

◆ getForce()

utils::Scalar internal_forces::ligaments::Ligament::getForce ( )
protectedvirtual

Function allowing modification of the way the force is computed in computeForce().

Returns
The force of the ligament

Definition at line 211 of file Ligament.cpp.

◆ length()

const utils::Scalar & internal_forces::ligaments::Ligament::length ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
bool updateLigamentKinematics = true )

Get the length of the ligament.

Parameters
updatedModelThe joint model updated to the proper kinematic level
QThe generalized coordinates
updateLigamentKinematicsIf the kinematic parameters of the ligament should be updated
Returns
The length of the ligament

Definition at line 152 of file Ligament.cpp.

◆ ligamentsPointsInGlobal() [1/2]

const std::vector< utils::Vector3d > & internal_forces::ligaments::Ligament::ligamentsPointsInGlobal ( ) const

Return the previously computed ligament points in global reference frame.

Returns
The ligament points in global reference frame

Definition at line 226 of file Ligament.cpp.

◆ ligamentsPointsInGlobal() [2/2]

const std::vector< utils::Vector3d > & internal_forces::ligaments::Ligament::ligamentsPointsInGlobal ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
bool updateLigamentKinematics = true )

Return the ligament points in global reference frame.

Parameters
updatedModelThe joint model updated to the proper kinematic level
QThe generalized coordinates
updateLigamentKinematicsIf the kinematic parameters of the ligament should be updated
Returns
The ligament points in global reference frame

Definition at line 216 of file Ligament.cpp.

◆ position()

const internal_forces::Geometry & internal_forces::ligaments::Ligament::position ( ) const

Return the position of all the points attached to the ligament (0 being the origin).

Returns
The positions

Definition at line 148 of file Ligament.cpp.

◆ setCharacteristics()

void internal_forces::ligaments::Ligament::setCharacteristics ( const LigamentCharacteristics & characteristics)

Set the ligament characteristics.

Parameters
characteristicsNew value of the ligament characteristics

Definition at line 230 of file Ligament.cpp.

◆ setPosition()

void internal_forces::ligaments::Ligament::setPosition ( const internal_forces::Geometry & positions)

Set the position of all the points attached to the ligament (0 being the origin).

Parameters
positionsNew value of the position

Definition at line 143 of file Ligament.cpp.

◆ setType()

void internal_forces::ligaments::Ligament::setType ( )
protectedvirtual

◆ type()

internal_forces::ligaments::LIGAMENT_TYPE internal_forces::ligaments::Ligament::type ( ) const

Return the type of the ligament.

Returns
The type of the ligament

Definition at line 104 of file Ligament.cpp.

◆ updateOrientations() [1/4]

void internal_forces::ligaments::Ligament::updateOrientations ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q )

Update the position of the origin and insertion positions of the ligament.

Parameters
updatedModelThe joint model updated to the proper kinematic level
QThe generalized coordinates

Definition at line 112 of file Ligament.cpp.

◆ updateOrientations() [2/4]

void internal_forces::ligaments::Ligament::updateOrientations ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot )

Update the position of the origin and insertion nodes of the ligament.

Parameters
updatedModelThe joint model updated to the proper kinematic level
QThe generalized coordinates
QdotThe generalized velocities

Definition at line 118 of file Ligament.cpp.

◆ updateOrientations() [3/4]

void internal_forces::ligaments::Ligament::updateOrientations ( std::vector< utils::Vector3d > & ligamentPointsInGlobal,
utils::Matrix & jacoPointsInGlobal )

Update by hand the position of the origin and insertion nodes of the ligament.

Parameters
ligamentPointsInGlobalThe ligament points
jacoPointsInGlobalThe jacobian matrix

Definition at line 127 of file Ligament.cpp.

◆ updateOrientations() [4/4]

void internal_forces::ligaments::Ligament::updateOrientations ( std::vector< utils::Vector3d > & ligamentPointsInGlobal,
utils::Matrix & jacoPointsInGlobal,
const rigidbody::GeneralizedVelocity & Qdot )

Update by hand the position of the origin and insertion nodes of the ligament.

Parameters
ligamentPointsInGlobalThe ligament points
jacoPointsInGlobalThe Jacobian matrix
QdotThe genelized velocities

Definition at line 134 of file Ligament.cpp.

◆ velocity()

const utils::Scalar & internal_forces::ligaments::Ligament::velocity ( rigidbody::Joints & updatedModel,
const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
bool updateLigamentKinematics = true )

Return the velocity of the ligament.

Parameters
updatedModelThe joint model
QThe generalized coordinates
QdotThe generalized velocities
updateLigamentKinematicsIf the kinematic parameters of the ligament should be updated
Returns
The velocity of the ligament

Definition at line 161 of file Ligament.cpp.

Member Data Documentation

◆ m_characteristics

std::shared_ptr<LigamentCharacteristics> BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::m_characteristics
protected

The ligament characteristics.

Definition at line 276 of file Ligament.h.

◆ m_damping

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::m_damping
protected

The ligament damping term.

Definition at line 277 of file Ligament.h.

◆ m_Fl

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::m_Fl
protected

Force-Length.

Definition at line 292 of file Ligament.h.

◆ m_position

std::shared_ptr<internal_forces::Geometry> BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::m_position
protected

The position of all the nodes of the ligament (0 being the origin and last being insertion

Definition at line 272 of file Ligament.h.

◆ m_type

std::shared_ptr<LIGAMENT_TYPE> BIORBD_NAMESPACE::internal_forces::ligaments::Ligament::m_type
protected

The type of the ligament.

Definition at line 274 of file Ligament.h.


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