|
Biorbd Release_1.13.0
|
Half cylinder of infinite length (the length only affect the graphical representation) object that makes the muscle to wrap around. More...
#include <WrappingHalfCylinder.h>
Classes | |
| class | NodeMusclePair |
| Pair of 2 muscles points. More... | |
Public Member Functions | |
| WrappingHalfCylinder () | |
| Construct a wrapping half cylinder. | |
| WrappingHalfCylinder (const utils::Vector3d &other) | |
| Construct a wrapping half cylinder. | |
| WrappingHalfCylinder (const utils::Vector3d *other) | |
| Construct a wrapping half cylinder. | |
| WrappingHalfCylinder (const utils::RotoTrans &rt, const utils::Scalar &radius, const utils::Scalar &length) | |
| Construct a wrapping half cylinder. | |
| WrappingHalfCylinder (const utils::RotoTrans &rt, const utils::Scalar &radius, const utils::Scalar &length, const utils::String &name, const utils::String &parentName) | |
| Construct a wrapping half cylinder. | |
| WrappingHalfCylinder | DeepCopy () const |
| Deep copy of the wrapping half cylinder. | |
| void | DeepCopy (const WrappingHalfCylinder &other) |
| Deep copy of the wrapping half cylinder in another wrapping half cylinder. | |
| void | wrapPoints (const utils::RotoTrans &rt, const utils::Vector3d &p1_bone, const utils::Vector3d &p2_bone, utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *length=nullptr) |
| From the position of the half cylinder, return the 2 locations where the muscle leaves the wrapping object. | |
| void | wrapPoints (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, const utils::Vector3d &p1_bone, const utils::Vector3d &p2_bone, utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *length=nullptr) |
| From the position of the half cylinder, return the 2 locations where the muscle leaves the wrapping object. | |
| void | wrapPoints (utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *length=nullptr) |
| Returns the previously computed 2 locations where the muscle leaves the wrapping object. | |
| virtual const utils::RotoTrans & | RT (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true) |
| Return the RotoTrans matrix of the half cylinder. | |
| void | setRadius (const utils::Scalar &val) |
| Set the diameter of the wrapping half cylinder. | |
| utils::Scalar | radius () const |
| Return the radius of the half cylinder. | |
| utils::Scalar | diameter () const |
| Return the diamter of the half cylinder. | |
| void | setLength (const utils::Scalar &val) |
| Set the length of the half cylinder. | |
| const utils::Scalar & | length () const |
| Return the length of the half cylinder. | |
| Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::WrappingObject | |
| WrappingObject () | |
| Construct a wrapping object. | |
| WrappingObject (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z) | |
| Construct a wrapping object. | |
| WrappingObject (const utils::Scalar &x, const utils::Scalar &y, const utils::Scalar &z, const utils::String &name, const utils::String &parentName) | |
| Construct a wrapping object. | |
| WrappingObject (const utils::Vector3d &other) | |
| Construct a wrapping object. | |
| WrappingObject (const utils::Vector3d &other, const utils::String &name, const utils::String &parentName) | |
| Construct a wrapping object. | |
| void | DeepCopy (const WrappingObject &other) |
| Deep copy of the wrapping ibject in another wrapping object. | |
| const utils::RotoTrans & | RT () const |
| Return the RotoTrans matrix of the wrapping object. | |
| WrappingObject & | operator= (const utils::Vector3d &other) |
| To be able to use the equal "=" operator to define wrapping object. | |
| 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 | findTangentToCircle (const utils::Vector3d &p, utils::Vector3d &p_tan) const |
| Find the two tangents of a point with a circle. | |
| void | selectTangents (const NodeMusclePair &p, utils::Vector3d &p_tan) const |
| Select between a set of nodes which ones to keep. | |
| bool | findVerticalNode (const NodeMusclePair &pointsInGlobal, NodeMusclePair &pointsToWrap) const |
| Find the height of both points. | |
| bool | checkIfWraps (const NodeMusclePair &pointsInGlobal, NodeMusclePair &pointsToWrap) const |
| Check if a wrapper has to be done. | |
| utils::Scalar | computeLength (const NodeMusclePair &p) const |
| Compute the muscle length on the half cylinder. | |
| Protected Member Functions inherited from BIORBD_NAMESPACE::utils::Vector3d | |
| void | setType () |
| Set the type Vector3d. | |
Protected Attributes | |
| std::shared_ptr< utils::Scalar > | m_radius |
| Diameter of the half cylinder diametre du cylindre. | |
| std::shared_ptr< utils::Scalar > | m_length |
| Length of the half cylinder. | |
| std::shared_ptr< utils::RotoTrans > | m_RTtoParent |
| RotoTrans matrix with the parent. | |
| std::shared_ptr< utils::Vector3d > | m_p1Wrap |
| First point of contact with the wrap. | |
| std::shared_ptr< utils::Vector3d > | m_p2Wrap |
| Second point of contact with the wrap. | |
| std::shared_ptr< utils::Scalar > | m_lengthAroundWrap |
| Length between p1 and p2. | |
| Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::WrappingObject | |
| std::shared_ptr< utils::RotoTrans > | m_RT |
| RotoTrans matrix of the wrapping object. | |
| 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. | |
Half cylinder of infinite length (the length only affect the graphical representation) object that makes the muscle to wrap around.
Watch out, due to high computational cost, the CasADi backend always assume contact between the muscle and cylinder. This will create discrepancies between the Eigen and the CasADi backend
Definition at line 18 of file WrappingHalfCylinder.h.
| internal_forces::WrappingHalfCylinder::WrappingHalfCylinder | ( | ) |
Construct a wrapping half cylinder.
Definition at line 16 of file WrappingHalfCylinder.cpp.
| internal_forces::WrappingHalfCylinder::WrappingHalfCylinder | ( | const utils::Vector3d & | other | ) |
Construct a wrapping half cylinder.
| other | The position of the wrapping half cylinder |
Definition at line 27 of file WrappingHalfCylinder.cpp.
| internal_forces::WrappingHalfCylinder::WrappingHalfCylinder | ( | const utils::Vector3d * | other | ) |
Construct a wrapping half cylinder.
| other | The position of the wrapping half cylinder |
Definition at line 41 of file WrappingHalfCylinder.cpp.
| internal_forces::WrappingHalfCylinder::WrappingHalfCylinder | ( | const utils::RotoTrans & | rt, |
| const utils::Scalar & | radius, | ||
| const utils::Scalar & | length ) |
Construct a wrapping half cylinder.
| rt | RotoTrans matrix of the origin of the half cylinder |
| radius | The radius of the half cylinder |
| length | The Length of the half cylinder |
Definition at line 55 of file WrappingHalfCylinder.cpp.
| internal_forces::WrappingHalfCylinder::WrappingHalfCylinder | ( | const utils::RotoTrans & | rt, |
| const utils::Scalar & | radius, | ||
| const utils::Scalar & | length, | ||
| const utils::String & | name, | ||
| const utils::String & | parentName ) |
Construct a wrapping half cylinder.
| rt | RotoTrans matrix |
| radius | The radius of the half cylinder |
| length | The length of the half cylinder |
| name | The name of the half cylinder |
| parentName | The parent name segment |
Definition at line 69 of file WrappingHalfCylinder.cpp.
|
protected |
Check if a wrapper has to be done.
| pointsInGlobal | The position of the muscle pair in global reference frame |
| pointsToWrap | The points to wrap |
Definition at line 344 of file WrappingHalfCylinder.cpp.
|
protected |
Compute the muscle length on the half cylinder.
| p | the muscle node pair |
Definition at line 386 of file WrappingHalfCylinder.cpp.
| internal_forces::WrappingHalfCylinder internal_forces::WrappingHalfCylinder::DeepCopy | ( | ) | const |
Deep copy of the wrapping half cylinder.
Definition at line 86 of file WrappingHalfCylinder.cpp.
| void internal_forces::WrappingHalfCylinder::DeepCopy | ( | const WrappingHalfCylinder & | other | ) |
Deep copy of the wrapping half cylinder in another wrapping half cylinder.
| other | The wrapping half cylinder to copy |
Definition at line 92 of file WrappingHalfCylinder.cpp.
| utils::Scalar internal_forces::WrappingHalfCylinder::diameter | ( | ) | const |
Return the diamter of the half cylinder.
Definition at line 204 of file WrappingHalfCylinder.cpp.
|
protected |
Find the two tangents of a point with a circle.
| p | The point |
| p_tan | The point tangent |
Definition at line 217 of file WrappingHalfCylinder.cpp.
|
protected |
Find the height of both points.
| pointsInGlobal | The position of the muscle pair in global reference frame |
| pointsToWrap | The points to wrap |
Definition at line 261 of file WrappingHalfCylinder.cpp.
| const utils::Scalar & internal_forces::WrappingHalfCylinder::length | ( | ) | const |
Return the length of the half cylinder.
Definition at line 213 of file WrappingHalfCylinder.cpp.
| utils::Scalar internal_forces::WrappingHalfCylinder::radius | ( | ) | const |
Return the radius of the half cylinder.
Definition at line 200 of file WrappingHalfCylinder.cpp.
|
virtual |
Return the RotoTrans matrix of the half cylinder.
| model | The joint model |
| Q | The generalized coordinates |
| updateKin | If the kinematics should be computed |
Implements BIORBD_NAMESPACE::internal_forces::WrappingObject.
Definition at line 186 of file WrappingHalfCylinder.cpp.
|
protected |
Select between a set of nodes which ones to keep.
| p | The 2 muscles points |
| p_tan | The selected point |
Definition at line 247 of file WrappingHalfCylinder.cpp.
| void internal_forces::WrappingHalfCylinder::setLength | ( | const utils::Scalar & | val | ) |
Set the length of the half cylinder.
| val | Value of the to set |
Definition at line 208 of file WrappingHalfCylinder.cpp.
| void internal_forces::WrappingHalfCylinder::setRadius | ( | const utils::Scalar & | val | ) |
Set the diameter of the wrapping half cylinder.
| val | Value of the diameter to set |
Definition at line 195 of file WrappingHalfCylinder.cpp.
|
virtual |
From the position of the half cylinder, return the 2 locations where the muscle leaves the wrapping object.
| rt | RotoTrans matrix of the half cylinder |
| p1_bone | 1st position of the muscle node |
| p2_bone | 2n position of the muscle node |
| p1 | The 1st position on the half cylinder the muscle leave |
| p2 | The 2nd position on the half cylinder the muscle leave |
| length | Length of the muscle (ignored if no value is provided) |
Implements BIORBD_NAMESPACE::internal_forces::WrappingObject.
Definition at line 103 of file WrappingHalfCylinder.cpp.
|
virtual |
From the position of the half cylinder, return the 2 locations where the muscle leaves the wrapping object.
| model | The joint model |
| Q | The generalized coordinates |
| p1_bone | 1st position of the muscle node |
| p2_bone | 2n position of the muscle node |
| p1 | The 1st position on the half cylinder the muscle leave |
| p2 | The 2nd position on the half cylinder the muscle leave |
| length | Length of the muscle (ignored if no value is provided) |
Implements BIORBD_NAMESPACE::internal_forces::WrappingObject.
Definition at line 161 of file WrappingHalfCylinder.cpp.
|
virtual |
Returns the previously computed 2 locations where the muscle leaves the wrapping object.
| p1 | The 1st position on the half cylinder the muscle leave |
| p2 | The 2nd position on the half cylinder the muscle leave |
| length | Length of the muscle (ignored if no value is provided) |
Implements BIORBD_NAMESPACE::internal_forces::WrappingObject.
Definition at line 175 of file WrappingHalfCylinder.cpp.
|
protected |
Length of the half cylinder.
Definition at line 238 of file WrappingHalfCylinder.h.
|
protected |
Length between p1 and p2.
Definition at line 247 of file WrappingHalfCylinder.h.
|
protected |
First point of contact with the wrap.
Definition at line 243 of file WrappingHalfCylinder.h.
|
protected |
Second point of contact with the wrap.
Definition at line 245 of file WrappingHalfCylinder.h.
|
protected |
Diameter of the half cylinder diametre du cylindre.
Definition at line 237 of file WrappingHalfCylinder.h.
|
protected |
RotoTrans matrix with the parent.
Definition at line 240 of file WrappingHalfCylinder.h.