Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::internal_forces::ligaments::LigamentSpringSecondOrder Class Reference

Class LigamentSpringSecondOrder is a ligament with same behavior than second order spring defined by: (k/2) * ((l-l0) + sqrt((l-l0)*(l-l0) + epsilon*epsilon)) with k is the stiffness and espilon a small parameter to avoid negative values. https://ieeexplore.ieee.org/abstract/document/6755458. More...

#include <LigamentSpringSecondOrder.h>

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

Public Member Functions

 LigamentSpringSecondOrder ()
 Contruct a Ligament.
 LigamentSpringSecondOrder (const utils::Scalar &stiffness, const utils::Scalar &epsilon, const utils::String &name, const Geometry &geometry, const LigamentCharacteristics &characteristics)
 Construct a second order spring like ligament.
 LigamentSpringSecondOrder (const utils::Scalar &stiffness, const utils::Scalar &epsilon, const utils::String &name, const Geometry &geometry, const LigamentCharacteristics &characteristics, const internal_forces::PathModifiers &pathModifiers)
 Construct a second order spring like ligament.
 LigamentSpringSecondOrder (const Ligament &other)
 Construct a second order spring like ligament from another ligament.
 LigamentSpringSecondOrder (const std::shared_ptr< Ligament > other)
 Construct a second order spring like ligament from another ligament.
virtual ~LigamentSpringSecondOrder ()
 Destroy class properly.
LigamentSpringSecondOrder DeepCopy () const
 Deep copy of a second order spring like ligament.
void DeepCopy (const LigamentSpringSecondOrder &other)
 Deep copy of a second order spring like ligament in a new second order spring like ligament.
const utils::Scalar & stiffness () const
 Get the stiffness.
void setStiffness (const utils::Scalar &stiffness)
 Set the stiffness.
const utils::Scalar & epsilon () const
 Get the epsilon.
void setEpsilon (const utils::Scalar &epsilon)
 Set the epsilon.
Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::ligaments::Ligament
 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 setType ()
 Set type to second order spring like ligament.
virtual void computeFl ()
 Compute the Force-length of the contractile element.
Protected Member Functions inherited from BIORBD_NAMESPACE::internal_forces::ligaments::Ligament
virtual void computeForce ()
 Compute the force of the ligament.
virtual utils::Scalar getForce ()
 Function allowing modification of the way the force is computed in computeForce().

Protected Attributes

std::shared_ptr< utils::Scalar > m_stiffness
 stiffness of the ligament
std::shared_ptr< utils::Scalar > m_epsilon
 small parameter to avoid negative value
Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::ligaments::Ligament
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

Class LigamentSpringSecondOrder is a ligament with same behavior than second order spring defined by: (k/2) * ((l-l0) + sqrt((l-l0)*(l-l0) + epsilon*epsilon)) with k is the stiffness and espilon a small parameter to avoid negative values. https://ieeexplore.ieee.org/abstract/document/6755458.

Definition at line 20 of file LigamentSpringSecondOrder.h.

Constructor & Destructor Documentation

◆ LigamentSpringSecondOrder() [1/5]

internal_forces::ligaments::LigamentSpringSecondOrder::LigamentSpringSecondOrder ( )

Contruct a Ligament.

Definition at line 16 of file LigamentSpringSecondOrder.cpp.

◆ LigamentSpringSecondOrder() [2/5]

internal_forces::ligaments::LigamentSpringSecondOrder::LigamentSpringSecondOrder ( const utils::Scalar & stiffness,
const utils::Scalar & epsilon,
const utils::String & name,
const Geometry & geometry,
const LigamentCharacteristics & characteristics )

Construct a second order spring like ligament.

Parameters
stiffnessThe ligament stiffness
epsilonThe ligament param to avoid negative values
nameThe ligament name
geometryThe ligament geometry
characteristicsThe ligament characteristics

Definition at line 24 of file LigamentSpringSecondOrder.cpp.

◆ LigamentSpringSecondOrder() [3/5]

internal_forces::ligaments::LigamentSpringSecondOrder::LigamentSpringSecondOrder ( const utils::Scalar & stiffness,
const utils::Scalar & epsilon,
const utils::String & name,
const Geometry & geometry,
const LigamentCharacteristics & characteristics,
const internal_forces::PathModifiers & pathModifiers )

Construct a second order spring like ligament.

Parameters
stiffnessThe ligament stiffness
epsilonThe ligament param to avoid negative values
nameThe ligament name
geometryThe ligament geometry
characteristicsThe ligament characteristics
pathModifiersThe set of path modifiers

Definition at line 38 of file LigamentSpringSecondOrder.cpp.

◆ LigamentSpringSecondOrder() [4/5]

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

Construct a second order spring like ligament from another ligament.

Parameters
otherThe other ligament

Definition at line 90 of file LigamentSpringSecondOrder.cpp.

◆ LigamentSpringSecondOrder() [5/5]

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

Construct a second order spring like ligament from another ligament.

Parameters
otherTHe other ligament

Definition at line 100 of file LigamentSpringSecondOrder.cpp.

◆ ~LigamentSpringSecondOrder()

internal_forces::ligaments::LigamentSpringSecondOrder::~LigamentSpringSecondOrder ( )
virtual

Destroy class properly.

Definition at line 113 of file LigamentSpringSecondOrder.cpp.

Member Function Documentation

◆ computeFl()

void internal_forces::ligaments::LigamentSpringSecondOrder::computeFl ( )
protectedvirtual

Compute the Force-length of the contractile element.

Implements BIORBD_NAMESPACE::internal_forces::ligaments::Ligament.

Definition at line 121 of file LigamentSpringSecondOrder.cpp.

◆ DeepCopy() [1/2]

internal_forces::ligaments::LigamentSpringSecondOrder internal_forces::ligaments::LigamentSpringSecondOrder::DeepCopy ( ) const

Deep copy of a second order spring like ligament.

Returns
A deep copy of a second order spring like ligament

Definition at line 58 of file LigamentSpringSecondOrder.cpp.

◆ DeepCopy() [2/2]

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

Deep copy of a second order spring like ligament in a new second order spring like ligament.

Parameters
otherThe second order spring like ligament to copy

Definition at line 63 of file LigamentSpringSecondOrder.cpp.

◆ epsilon()

const utils::Scalar & internal_forces::ligaments::LigamentSpringSecondOrder::epsilon ( ) const

Get the epsilon.

Returns
The epsilon

Definition at line 81 of file LigamentSpringSecondOrder.cpp.

◆ setEpsilon()

void internal_forces::ligaments::LigamentSpringSecondOrder::setEpsilon ( const utils::Scalar & epsilon)

Set the epsilon.

Parameters
epsilonThe epsilon

Definition at line 85 of file LigamentSpringSecondOrder.cpp.

◆ setStiffness()

void internal_forces::ligaments::LigamentSpringSecondOrder::setStiffness ( const utils::Scalar & stiffness)

Set the stiffness.

Parameters
stiffnessThe stiffness

Definition at line 75 of file LigamentSpringSecondOrder.cpp.

◆ setType()

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

Set type to second order spring like ligament.

Reimplemented from BIORBD_NAMESPACE::internal_forces::ligaments::Ligament.

Definition at line 116 of file LigamentSpringSecondOrder.cpp.

◆ stiffness()

const utils::Scalar & internal_forces::ligaments::LigamentSpringSecondOrder::stiffness ( ) const

Get the stiffness.

Returns
The stiffness

Definition at line 71 of file LigamentSpringSecondOrder.cpp.

Member Data Documentation

◆ m_epsilon

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::ligaments::LigamentSpringSecondOrder::m_epsilon
protected

small parameter to avoid negative value

Definition at line 126 of file LigamentSpringSecondOrder.h.

◆ m_stiffness

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::ligaments::LigamentSpringSecondOrder::m_stiffness
protected

stiffness of the ligament

Definition at line 124 of file LigamentSpringSecondOrder.h.


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