Biorbd
|
Class holder for a set of actuators. More...
#include <Actuators.h>
Public Member Functions | |
Actuators () | |
Construct actuators. | |
Actuators (const biorbd::actuator::Actuators &other) | |
Construct actuators from another set of actuators. More... | |
virtual | ~Actuators () |
Destroy actuators class properly. | |
void | DeepCopy (const biorbd::actuator::Actuators &other) |
Deep copy of the actuator holder from other actuator holder. More... | |
void | addActuator (const biorbd::actuator::Actuator &a) |
Add an actuator to the set of actuators. More... | |
void | closeActuator () |
Indicate to biorbd to are done adding actuators, sanity checks are performed. More... | |
std::pair< biorbd::rigidbody::GeneralizedTorque, biorbd::rigidbody::GeneralizedTorque > | torqueMax (const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::rigidbody::GeneralizedVelocity &Qdot) |
Return two vectors of max torque (it is impossible to know if eccentric or concentric is required, therefore both are returned) More... | |
biorbd::rigidbody::GeneralizedTorque | torqueMax (const biorbd::utils::Vector &activation, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::rigidbody::GeneralizedVelocity &Qdot) |
Return the maximal generalized torque. More... | |
biorbd::rigidbody::GeneralizedTorque | torque (const biorbd::utils::Vector &activation, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::rigidbody::GeneralizedVelocity &Qdot) |
Return the generalized torque. More... | |
const std::pair< std::shared_ptr< biorbd::actuator::Actuator >, std::shared_ptr< biorbd::actuator::Actuator > > & | actuator (unsigned int dof) |
Return a specific concentric/eccentric actuator. More... | |
const biorbd::actuator::Actuator & | actuator (unsigned int dof, bool concentric) |
Return a specific actuator. More... | |
unsigned int | nbActuators () const |
Return the toal number of actuators. More... | |
Protected Member Functions | |
biorbd::utils::Scalar | getTorqueMaxDirection (const std::shared_ptr< Actuator > actuator, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot) const |
getTorqueMaxDirection Get the max torque of a specific actuator (interface necessary because of CasADi) More... | |
Protected Attributes | |
std::shared_ptr< std::vector< std::pair< std::shared_ptr< biorbd::actuator::Actuator >, std::shared_ptr< biorbd::actuator::Actuator > > > > | m_all |
All the actuators reunited /pair (+ or -) | |
std::shared_ptr< std::vector< bool > > | m_isDofSet |
If DoF all dof are set. | |
std::shared_ptr< bool > | m_isClose |
If the set is ready. | |
Class holder for a set of actuators.
Definition at line 25 of file Actuators.h.
biorbd::actuator::Actuators::Actuators | ( | const biorbd::actuator::Actuators & | other | ) |
Construct actuators from another set of actuators.
other | The other actuators |
Definition at line 24 of file Actuators.cpp.
const std::pair< std::shared_ptr< biorbd::actuator::Actuator >, std::shared_ptr< biorbd::actuator::Actuator > > & biorbd::actuator::Actuators::actuator | ( | unsigned int | dof | ) |
Return a specific concentric/eccentric actuator.
dof | Index of the DoF associated with actuator |
Definition at line 175 of file Actuators.cpp.
const biorbd::actuator::Actuator & biorbd::actuator::Actuators::actuator | ( | unsigned int | dof, |
bool | concentric | ||
) |
Return a specific actuator.
dof | Index of the DoF associated with actuator |
concentric | If the return value is the concentric (true) or eccentric (false) value |
Definition at line 180 of file Actuators.cpp.
void biorbd::actuator::Actuators::addActuator | ( | const biorbd::actuator::Actuator & | a | ) |
Add an actuator to the set of actuators.
a | The actuator to add |
Definition at line 82 of file Actuators.cpp.
void biorbd::actuator::Actuators::closeActuator | ( | ) |
Indicate to biorbd to are done adding actuators, sanity checks are performed.
Definition at line 156 of file Actuators.cpp.
void biorbd::actuator::Actuators::DeepCopy | ( | const biorbd::actuator::Actuators & | other | ) |
Deep copy of the actuator holder from other actuator holder.
other | The other actuators |
Definition at line 39 of file Actuators.cpp.
|
protected |
getTorqueMaxDirection Get the max torque of a specific actuator (interface necessary because of CasADi)
actuator | The actuator to gather from |
Q | The Generalized coordinates |
Qdot | The Generalized velocity |
Definition at line 303 of file Actuators.cpp.
unsigned int biorbd::actuator::Actuators::nbActuators | ( | ) | const |
Return the toal number of actuators.
Definition at line 193 of file Actuators.cpp.
biorbd::rigidbody::GeneralizedTorque biorbd::actuator::Actuators::torque | ( | const biorbd::utils::Vector & | activation, |
const biorbd::rigidbody::GeneralizedCoordinates & | Q, | ||
const biorbd::rigidbody::GeneralizedVelocity & | Qdot | ||
) |
Return the generalized torque.
activation | The level of activation of the torque. A positive value is interpreted as concentric contraction and negative as eccentric contraction |
Q | The generalized coordinates of the actuators |
Qdot | The generalized velocities of the actuators |
Definition at line 198 of file Actuators.cpp.
std::pair< biorbd::rigidbody::GeneralizedTorque, biorbd::rigidbody::GeneralizedTorque > biorbd::actuator::Actuators::torqueMax | ( | const biorbd::rigidbody::GeneralizedCoordinates & | Q, |
const biorbd::rigidbody::GeneralizedVelocity & | Qdot | ||
) |
Return two vectors of max torque (it is impossible to know if eccentric or concentric is required, therefore both are returned)
Q | The generalized coordinates of the actuators |
Qdot | The generalized velocities of the actuators |
Definition at line 230 of file Actuators.cpp.
biorbd::rigidbody::GeneralizedTorque biorbd::actuator::Actuators::torqueMax | ( | const biorbd::utils::Vector & | activation, |
const biorbd::rigidbody::GeneralizedCoordinates & | Q, | ||
const biorbd::rigidbody::GeneralizedVelocity & | Qdot | ||
) |
Return the maximal generalized torque.
activation | The level of activation of the torque. A positive value is interpreted as concentric contraction and negative as eccentric contraction |
Q | The generalized coordinates of the actuators |
Qdot | The generalized velocities of the actuators |
Definition at line 274 of file Actuators.cpp.