Biorbd Release_1.13.0
Loading...
Searching...
No Matches
MuscleGeometry.h
1#ifndef BIORBD_MUSCLES_MUSCLE_GEOMETRY_H
2#define BIORBD_MUSCLES_MUSCLE_GEOMETRY_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7#include <vector>
8
9#include "InternalForces/Geometry.h"
10#include "Utils/Scalar.h"
11
12namespace BIORBD_NAMESPACE {
13namespace utils {
14class Matrix;
15class Vector;
16class Vector3d;
17} // namespace utils
18
19namespace rigidbody {
20class Joints;
23} // namespace rigidbody
24
25namespace internal_forces {
26class PathModifiers;
27
28namespace muscles {
29class Characteristics;
30
34class BIORBD_API MuscleGeometry : public Geometry {
35 public:
40
47 const utils::Vector3d& origin,
48 const utils::Vector3d& insertion);
49
55
60 void DeepCopy(const MuscleGeometry& other);
61
78 rigidbody::Joints& updatedModel,
79 const Characteristics& characteristics,
80 const rigidbody::GeneralizedCoordinates* Q = nullptr,
81 const rigidbody::GeneralizedVelocity* Qdot = nullptr);
82
100 rigidbody::Joints& updatedModel,
101 const Characteristics& characteristics,
102 internal_forces::PathModifiers& pathModifiers,
103 const rigidbody::GeneralizedCoordinates* Q = nullptr,
104 const rigidbody::GeneralizedVelocity* Qdot = nullptr);
105
116 void updateKinematics(
117 std::vector<utils::Vector3d>& musclePointsInGlobal,
118 utils::Matrix& jacoPointsInGlobal,
119 const Characteristics& characteristics,
120 const rigidbody::GeneralizedVelocity* Qdot = nullptr);
121
126 const utils::Scalar& length() const;
127
132 const utils::Scalar& musculoTendonLength() const;
133
134 protected:
143 const Characteristics* characteristics,
144 internal_forces::PathModifiers* pathModifiers = nullptr);
145
152 const utils::Scalar& length(
153 const Characteristics* characteristics,
154 internal_forces::PathModifiers* pathModifiers = nullptr);
155
156 // Position des nodes dans le repere local
157 std::shared_ptr<utils::Scalar> m_muscleLength;
158 std::shared_ptr<utils::Scalar>
160};
161
162} // namespace muscles
163} // namespace internal_forces
164} // namespace BIORBD_NAMESPACE
165
166#endif // BIORBD_MUSCLES_MUSCLE_GEOMETRY_H
Holder of all the path modifiers of a muscle.
std::shared_ptr< utils::Scalar > m_muscleTendonLength
muscle tendon length
const utils::Scalar & musculoTendonLength() const
Return the previously computed muscle tendon length.
std::shared_ptr< utils::Scalar > m_muscleLength
length
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(const rigidbody::GeneralizedVelocity *Qdot, const Characteristics *characteristics, internal_forces::PathModifiers *pathModifiers=nullptr)
Actual function that implements the update of the kinematics.
MuscleGeometry DeepCopy() const
Deep copy of a muscle geometry.
const utils::Scalar & length() const
Return the previously computed muscle length.
This is the core of the musculoskeletal model in biorbd.
Definition Joints.h:48
A wrapper for the Eigen::MatrixXd.
Definition Matrix.h:18
Wrapper around Eigen Vector3d and attach it to a parent.
Definition Vector3d.h:27
Wrapper of the Eigen VectorXd.
Definition Vector.h:21