Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::internal_forces::muscles::MuscleGeometry Class Reference

Class muscle geometry of the muscle. More...

#include <MuscleGeometry.h>

Inheritance diagram for BIORBD_NAMESPACE::internal_forces::muscles::MuscleGeometry:
BIORBD_NAMESPACE::internal_forces::Geometry

Public Member Functions

 MuscleGeometry ()
 Construct muscle geometry.
 MuscleGeometry (const utils::Vector3d &origin, const utils::Vector3d &insertion)
 Construct muscle geometry.
MuscleGeometry DeepCopy () const
 Deep copy of a muscle geometry.
void DeepCopy (const MuscleGeometry &other)
 Deep copy of a muscle geometry from another muscle geometry.
void updateKinematics (rigidbody::Joints &updatedModel, const Characteristics &characteristics, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles.
void updateKinematics (rigidbody::Joints &updatedModel, const Characteristics &characteristics, internal_forces::PathModifiers &pathModifiers, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles.
void updateKinematics (std::vector< utils::Vector3d > &musclePointsInGlobal, utils::Matrix &jacoPointsInGlobal, const Characteristics &characteristics, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles by hand.
const utils::Scalar & length () const
 Return the previously computed muscle length.
const utils::Scalar & musculoTendonLength () const
 Return the previously computed muscle tendon length.
Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::Geometry
 Geometry ()
 Construct geometry.
 Geometry (const utils::Vector3d &origin, const utils::Vector3d &insertion)
 Construct geometry.
Geometry DeepCopy () const
 Deep copy of a geometry.
void DeepCopy (const Geometry &other)
 Deep copy of a geometry from another geometry.
void updateKinematics (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles.
void updateKinematics (rigidbody::Joints &updatedModel, internal_forces::PathModifiers &pathModifiers, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles.
void updateKinematics (std::vector< utils::Vector3d > &musclePointsInGlobal, utils::Matrix &jacoPointsInGlobal, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
 Updates the position and dynamic elements of the muscles by hand.
void setOrigin (const utils::Vector3d &position)
 Set the origin position in the local reference frame of the muscle.
const utils::Vector3d & originInLocal () const
 Return the origin position.
void setInsertionInLocal (const utils::Vector3d &position)
 Set the insertion position.
const utils::Vector3d & insertionInLocal () const
 Return the insertion position.
const utils::Vector3d & originInGlobal () const
 Return the origin position in the global reference.
const utils::Vector3d & insertionInGlobal () const
 Return the insertion position in the global reference.
const std::vector< utils::Vector3d > & pointsInGlobal () const
 Return the muscles points in the global reference.
const utils::Scalar & length () const
 Return the previously computed muscle length.
const utils::Scalar & velocity () const
 Return the previously computed velocity.
const utils::Matrix & jacobian () const
 Return the previously computed muscle jacobian.
utils::Matrix jacobianOrigin () const
 Return the gradient of the jacobian for the origin node.
utils::Matrix jacobianInsertion () const
 Return the gradient of the jacobian for the insertion node.
utils::Matrix jacobian (size_t idxViaPoint) const
 Return the gradient of the jacobian for the via specified node.
const utils::Matrix & jacobianLength () const
 Return the jacobian length of the muscle.

Protected Member Functions

void _updateKinematics (const rigidbody::GeneralizedVelocity *Qdot, const Characteristics *characteristics, internal_forces::PathModifiers *pathModifiers=nullptr)
 Actual function that implements the update of the kinematics.
const utils::Scalar & length (const Characteristics *characteristics, internal_forces::PathModifiers *pathModifiers=nullptr)
 Update the kinematics, compute and return the muscle length.
Protected Member Functions inherited from BIORBD_NAMESPACE::internal_forces::Geometry
void _updateKinematics (const rigidbody::GeneralizedVelocity *Qdot, internal_forces::PathModifiers *pathModifiers=nullptr)
 Actual function that implements the update of the kinematics.
const utils::Vector3d & originInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q)
 Updates the kinematics and return the position of the origin node.
const utils::Vector3d & insertionInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q)
 Updates the kinematics and return the position of the insertion node.
void setPointsInGlobal (std::vector< utils::Vector3d > &ptsInGlobal)
 Set the muscle points in global.
void setPointsInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, internal_forces::PathModifiers *pathModifiers=nullptr)
 Set the muscle points in global.
const utils::Scalar & length (internal_forces::PathModifiers *pathModifiers=nullptr)
 Update the kinematics, compute and return the muscle length.
const utils::Scalar & velocity (const rigidbody::GeneralizedVelocity &Qdot)
 Update the kinematics, compute and return the muscle velocity assuming not via points nor wrapping objects.
void setJacobianDimension (rigidbody::Joints &model)
 Set the jacobian dimensions.
void jacobian (const utils::Matrix &jaco)
 Force a jacobian computed from the user.
void jacobian (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q)
 Compute the jacobian.
void computeJacobianLength ()
 Compute the muscle length jacobian.

Protected Attributes

std::shared_ptr< utils::Scalar > m_muscleLength
 length
std::shared_ptr< utils::Scalar > m_muscleTendonLength
 muscle tendon length
Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::Geometry
std::shared_ptr< utils::Vector3d > m_origin
 Origin node.
std::shared_ptr< utils::Vector3d > m_insertion
 Insertion node.
std::shared_ptr< utils::Vector3d > m_originInGlobal
 Position of the origin in the global reference.
std::shared_ptr< utils::Vector3d > m_insertionInGlobal
std::shared_ptr< std::vector< utils::Vector3d > > m_pointsInGlobal
 Position of all the points in the global reference.
std::shared_ptr< std::vector< utils::Vector3d > > m_pointsInLocal
 Position of all the points in local.
std::shared_ptr< utils::Matrix > m_jacobian
 The jacobian matrix.
std::shared_ptr< utils::Matrix > m_jacobianLength
 The muscle length jacobian.
std::shared_ptr< utils::Scalar > m_length
 length
std::shared_ptr< utils::Scalar > m_velocity
 Velocity of the muscular elongation.
std::shared_ptr< bool > m_isGeometryComputed
std::shared_ptr< bool > m_isVelocityComputed
std::shared_ptr< bool > m_posAndJacoWereForced

Detailed Description

Class muscle geometry of the muscle.

Definition at line 34 of file MuscleGeometry.h.

Constructor & Destructor Documentation

◆ MuscleGeometry() [1/2]

internal_forces::muscles::MuscleGeometry::MuscleGeometry ( )

Construct muscle geometry.

Definition at line 24 of file MuscleGeometry.cpp.

◆ MuscleGeometry() [2/2]

internal_forces::muscles::MuscleGeometry::MuscleGeometry ( const utils::Vector3d & origin,
const utils::Vector3d & insertion )

Construct muscle geometry.

Parameters
originThe origin node of the muscle
insertionThe insertion node of the muscle

Definition at line 31 of file MuscleGeometry.cpp.

Member Function Documentation

◆ _updateKinematics()

void internal_forces::muscles::MuscleGeometry::_updateKinematics ( const rigidbody::GeneralizedVelocity * Qdot,
const Characteristics * characteristics,
internal_forces::PathModifiers * pathModifiers = nullptr )
protected

Actual function that implements the update of the kinematics.

Parameters
QdotThe generalized velocities
characteristicsThe muscle characteristics
pathModifiersThe set of path modifiers

Definition at line 122 of file MuscleGeometry.cpp.

◆ DeepCopy() [1/2]

internal_forces::muscles::MuscleGeometry internal_forces::muscles::MuscleGeometry::DeepCopy ( ) const

Deep copy of a muscle geometry.

Returns
A deep copy of a muscle geometry

Definition at line 39 of file MuscleGeometry.cpp.

◆ DeepCopy() [2/2]

void internal_forces::muscles::MuscleGeometry::DeepCopy ( const MuscleGeometry & other)

Deep copy of a muscle geometry from another muscle geometry.

Parameters
otherThe muscle geometry to copy

Definition at line 45 of file MuscleGeometry.cpp.

◆ length() [1/2]

const utils::Scalar & internal_forces::muscles::MuscleGeometry::length ( ) const

Return the previously computed muscle length.

Returns
The muscle lengh

Definition at line 105 of file MuscleGeometry.cpp.

◆ length() [2/2]

const utils::Scalar & internal_forces::muscles::MuscleGeometry::length ( const Characteristics * characteristics,
internal_forces::PathModifiers * pathModifiers = nullptr )
protected

Update the kinematics, compute and return the muscle length.

Parameters
characteristicsThe muscle characteristics
pathModifiersThe set of path modifiers
Returns
The muscle length

Definition at line 140 of file MuscleGeometry.cpp.

◆ musculoTendonLength()

const utils::Scalar & internal_forces::muscles::MuscleGeometry::musculoTendonLength ( ) const

Return the previously computed muscle tendon length.

Returns
The muscle tendon lengh

Definition at line 113 of file MuscleGeometry.cpp.

◆ updateKinematics() [1/3]

void internal_forces::muscles::MuscleGeometry::updateKinematics ( rigidbody::Joints & updatedModel,
const Characteristics & characteristics,
const rigidbody::GeneralizedCoordinates * Q = nullptr,
const rigidbody::GeneralizedVelocity * Qdot = nullptr )

Updates the position and dynamic elements of the muscles.

Parameters
updatedModelThe joint model previously updated to the proper level
characteristicsThe muscle characteristics
QThe generalized coordinates of the joints (not needed if updateKinLevel is less than 2)
QdotThe generalized velocities of the joints (not needed if updateKinLevel is less than 2)

updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot

WARNING, using updateKinematics overrides the previously sent position and jacobian

Definition at line 53 of file MuscleGeometry.cpp.

◆ updateKinematics() [2/3]

void internal_forces::muscles::MuscleGeometry::updateKinematics ( rigidbody::Joints & updatedModel,
const Characteristics & characteristics,
internal_forces::PathModifiers & pathModifiers,
const rigidbody::GeneralizedCoordinates * Q = nullptr,
const rigidbody::GeneralizedVelocity * Qdot = nullptr )

Updates the position and dynamic elements of the muscles.

Parameters
updatedModelThe joint model previously updated to the proper level
characteristicsThe muscle characteristics
pathModifiersThe path modifiers
QThe generalized coordinates of the joints (not needed if updateKinLevel is less than 2)
QdotThe generalized velocities of the joints (not needed if updateKinLevel is less than 2)

updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot

WARNING, using updateKinematics overrides the previously sent position and jacobian

Definition at line 70 of file MuscleGeometry.cpp.

◆ updateKinematics() [3/3]

void internal_forces::muscles::MuscleGeometry::updateKinematics ( std::vector< utils::Vector3d > & musclePointsInGlobal,
utils::Matrix & jacoPointsInGlobal,
const Characteristics & characteristics,
const rigidbody::GeneralizedVelocity * Qdot = nullptr )

Updates the position and dynamic elements of the muscles by hand.

Parameters
musclePointsInGlobalPosition of all the points in global
jacoPointsInGlobalPosition of all the Jacobian points in global
characteristicsThe muscle characteristics
QdotThe generalized velocities of the joints

updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot

Definition at line 88 of file MuscleGeometry.cpp.

Member Data Documentation

◆ m_muscleLength

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::muscles::MuscleGeometry::m_muscleLength
protected

length

Definition at line 157 of file MuscleGeometry.h.

◆ m_muscleTendonLength

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::muscles::MuscleGeometry::m_muscleTendonLength
protected

muscle tendon length

Definition at line 159 of file MuscleGeometry.h.


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