Biorbd
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
biorbd::actuator::Actuators Class Reference

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::GeneralizedTorquetorqueMax (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::Actuatoractuator (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.
 

Detailed Description

Class holder for a set of actuators.

Definition at line 25 of file Actuators.h.

Constructor & Destructor Documentation

◆ Actuators()

biorbd::actuator::Actuators::Actuators ( const biorbd::actuator::Actuators other)

Construct actuators from another set of actuators.

Parameters
otherThe other actuators

Definition at line 24 of file Actuators.cpp.

Member Function Documentation

◆ actuator() [1/2]

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.

Parameters
dofIndex of the DoF associated with actuator
Returns
The actuator

Definition at line 175 of file Actuators.cpp.

◆ actuator() [2/2]

const biorbd::actuator::Actuator & biorbd::actuator::Actuators::actuator ( unsigned int  dof,
bool  concentric 
)

Return a specific actuator.

Parameters
dofIndex of the DoF associated with actuator
concentricIf the return value is the concentric (true) or eccentric (false) value
Returns
The actuator

Definition at line 180 of file Actuators.cpp.

◆ addActuator()

void biorbd::actuator::Actuators::addActuator ( const biorbd::actuator::Actuator a)

Add an actuator to the set of actuators.

Parameters
aThe actuator to add

Definition at line 82 of file Actuators.cpp.

◆ closeActuator()

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.

◆ DeepCopy()

void biorbd::actuator::Actuators::DeepCopy ( const biorbd::actuator::Actuators other)

Deep copy of the actuator holder from other actuator holder.

Parameters
otherThe other actuators

Definition at line 39 of file Actuators.cpp.

◆ getTorqueMaxDirection()

biorbd::utils::Scalar biorbd::actuator::Actuators::getTorqueMaxDirection ( const std::shared_ptr< Actuator actuator,
const rigidbody::GeneralizedCoordinates Q,
const rigidbody::GeneralizedVelocity Qdot 
) const
protected

getTorqueMaxDirection Get the max torque of a specific actuator (interface necessary because of CasADi)

Parameters
actuatorThe actuator to gather from
QThe Generalized coordinates
QdotThe Generalized velocity
Returns
The torque max

Definition at line 303 of file Actuators.cpp.

◆ nbActuators()

unsigned int biorbd::actuator::Actuators::nbActuators ( ) const

Return the toal number of actuators.

Returns
The total number of actuators

Definition at line 193 of file Actuators.cpp.

◆ torque()

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.

Parameters
activationThe level of activation of the torque. A positive value is interpreted as concentric contraction and negative as eccentric contraction
QThe generalized coordinates of the actuators
QdotThe generalized velocities of the actuators
Returns
The maximal generalized torque

Definition at line 198 of file Actuators.cpp.

◆ torqueMax() [1/2]

Return two vectors of max torque (it is impossible to know if eccentric or concentric is required, therefore both are returned)

Parameters
QThe generalized coordinates of the actuators
QdotThe generalized velocities of the actuators
Returns
Two vectors of maximal torque

Definition at line 230 of file Actuators.cpp.

◆ torqueMax() [2/2]

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.

Parameters
activationThe level of activation of the torque. A positive value is interpreted as concentric contraction and negative as eccentric contraction
QThe generalized coordinates of the actuators
QdotThe generalized velocities of the actuators
Returns
The maximal generalized torque

Definition at line 274 of file Actuators.cpp.


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