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

Base class for the wrapping objects. More...

#include <WrappingObject.h>

Inheritance diagram for BIORBD_NAMESPACE::internal_forces::WrappingObject:
BIORBD_NAMESPACE::utils::Vector3d BIORBD_NAMESPACE::utils::Node BIORBD_NAMESPACE::internal_forces::WrappingHalfCylinder BIORBD_NAMESPACE::internal_forces::WrappingSphere

Public Member Functions

 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.
virtual void wrapPoints (const utils::RotoTrans &rt, const utils::Vector3d &p1_bone, const utils::Vector3d &p2_bone, utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *muscleLength=nullptr)=0
 From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.
virtual 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 *muscleLength=nullptr)=0
 From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.
virtual void wrapPoints (utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *muscleLength=nullptr)=0
 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)=0
 Return the RotoTrans matrix of the 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 Attributes

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.

Additional Inherited Members

Protected Member Functions inherited from BIORBD_NAMESPACE::utils::Vector3d
void setType ()
 Set the type Vector3d.

Detailed Description

Base class for the wrapping objects.

Definition at line 23 of file WrappingObject.h.

Constructor & Destructor Documentation

◆ WrappingObject() [1/5]

internal_forces::WrappingObject::WrappingObject ( )

Construct a wrapping object.

Definition at line 9 of file WrappingObject.cpp.

◆ WrappingObject() [2/5]

internal_forces::WrappingObject::WrappingObject ( const utils::Scalar & x,
const utils::Scalar & y,
const utils::Scalar & z )

Construct a wrapping object.

Parameters
xX-Component of the wrapping object
yY-Component of the wrapping object
zZ-Component of the wrapping object

Definition at line 14 of file WrappingObject.cpp.

◆ WrappingObject() [3/5]

internal_forces::WrappingObject::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.

Parameters
xX-Component of the wrapping object
yY-Component of the wrapping object
zZ-Component of the wrapping object
nameName of the wrapping object
parentNameName of the parent segment

Definition at line 22 of file WrappingObject.cpp.

◆ WrappingObject() [4/5]

internal_forces::WrappingObject::WrappingObject ( const utils::Vector3d & other)

Construct a wrapping object.

Parameters
otherEigen vector

Definition at line 33 of file WrappingObject.cpp.

◆ WrappingObject() [5/5]

internal_forces::WrappingObject::WrappingObject ( const utils::Vector3d & other,
const utils::String & name,
const utils::String & parentName )

Construct a wrapping object.

Parameters
otherEigen vector
nameName of the wrapping object
parentNameName of the parent segment

Definition at line 45 of file WrappingObject.cpp.

Member Function Documentation

◆ DeepCopy()

void internal_forces::WrappingObject::DeepCopy ( const WrappingObject & other)

Deep copy of the wrapping ibject in another wrapping object.

Parameters
otherThe wrapping object to copy

Definition at line 54 of file WrappingObject.cpp.

◆ operator=()

WrappingObject & BIORBD_NAMESPACE::internal_forces::WrappingObject::operator= ( const utils::Vector3d & other)
inline

To be able to use the equal "=" operator to define wrapping object.

Parameters
otherThe 3d node to define the wrapping object
Returns
The wrapping object

Definition at line 153 of file WrappingObject.h.

◆ RT() [1/2]

const utils::RotoTrans & internal_forces::WrappingObject::RT ( ) const

Return the RotoTrans matrix of the wrapping object.

Returns
The RotoTrans matrix of the wrapping object

Definition at line 60 of file WrappingObject.cpp.

◆ RT() [2/2]

virtual const utils::RotoTrans & BIORBD_NAMESPACE::internal_forces::WrappingObject::RT ( rigidbody::Joints & model,
const rigidbody::GeneralizedCoordinates & Q,
bool updateKin = true )
pure virtual

Return the RotoTrans matrix of the wrapping object.

Parameters
modelThe joint model
QThe generalized coordinates
updateKinIf the kinematics should be computed
Returns
The RotoTrans matrix of the wrapping object

Implemented in BIORBD_NAMESPACE::internal_forces::WrappingHalfCylinder, and BIORBD_NAMESPACE::internal_forces::WrappingSphere.

◆ wrapPoints() [1/3]

virtual void BIORBD_NAMESPACE::internal_forces::WrappingObject::wrapPoints ( const utils::RotoTrans & rt,
const utils::Vector3d & p1_bone,
const utils::Vector3d & p2_bone,
utils::Vector3d & p1,
utils::Vector3d & p2,
utils::Scalar * muscleLength = nullptr )
pure virtual

From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.

Parameters
rtRotoTrans matrix of the wrapping object
p1_bone1st position of the muscle node
p2_bone2n position of the muscle node
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in BIORBD_NAMESPACE::internal_forces::WrappingHalfCylinder, and BIORBD_NAMESPACE::internal_forces::WrappingSphere.

◆ wrapPoints() [2/3]

virtual void BIORBD_NAMESPACE::internal_forces::WrappingObject::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 * muscleLength = nullptr )
pure virtual

From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.

Parameters
modelThe joint model
QThe generalized coordinates
p1_bone1st position of the muscle node
p2_bone2n position of the muscle node
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in BIORBD_NAMESPACE::internal_forces::WrappingHalfCylinder, and BIORBD_NAMESPACE::internal_forces::WrappingSphere.

◆ wrapPoints() [3/3]

virtual void BIORBD_NAMESPACE::internal_forces::WrappingObject::wrapPoints ( utils::Vector3d & p1,
utils::Vector3d & p2,
utils::Scalar * muscleLength = nullptr )
pure virtual

Returns the previously computed 2 locations where the muscle leaves the wrapping object.

Parameters
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in BIORBD_NAMESPACE::internal_forces::WrappingHalfCylinder, and BIORBD_NAMESPACE::internal_forces::WrappingSphere.

Member Data Documentation

◆ m_RT

std::shared_ptr<utils::RotoTrans> BIORBD_NAMESPACE::internal_forces::WrappingObject::m_RT
protected

RotoTrans matrix of the wrapping object.

Definition at line 160 of file WrappingObject.h.


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