Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Actuators.h
1
#ifndef BIORBD_ACTUATORS_ACTUATORS_H
2
#define BIORBD_ACTUATORS_ACTUATORS_H
3
4
#include "biorbdConfig.h"
5
6
#include <memory>
7
#include <vector>
8
9
#include "Utils/Scalar.h"
10
11
namespace
BIORBD_NAMESPACE {
12
namespace
utils {
13
class
Vector
;
14
}
15
16
namespace
rigidbody {
17
class
GeneralizedCoordinates
;
18
class
GeneralizedVelocity
;
19
class
GeneralizedTorque
;
20
}
// namespace rigidbody
21
22
namespace
internal_forces {
23
namespace
actuator {
24
class
Actuator
;
28
class
BIORBD_API
Actuators
{
29
public
:
33
Actuators
();
34
39
Actuators
(
const
Actuators
& other);
40
44
virtual
~Actuators
();
45
50
void
DeepCopy
(
const
Actuators
& other);
51
56
void
addActuator
(
const
Actuator
& a);
57
62
void
closeActuator
();
63
71
std::pair<rigidbody::GeneralizedTorque, rigidbody::GeneralizedTorque>
72
torqueMax
(
73
const
rigidbody::GeneralizedCoordinates
& Q,
74
const
rigidbody::GeneralizedVelocity
& Qdot);
75
85
rigidbody::GeneralizedTorque
torqueMax
(
86
const
utils::Vector
& activation,
87
const
rigidbody::GeneralizedCoordinates
& Q,
88
const
rigidbody::GeneralizedVelocity
& Qdot);
89
99
rigidbody::GeneralizedTorque
torque
(
100
const
utils::Vector
& activation,
101
const
rigidbody::GeneralizedCoordinates
& Q,
102
const
rigidbody::GeneralizedVelocity
& Qdot);
103
104
// Get and set
110
const
std::pair<std::shared_ptr<Actuator>, std::shared_ptr<Actuator>>&
111
actuator
(
size_t
dof);
112
120
const
Actuator
&
actuator
(
size_t
dof,
bool
concentric);
121
126
size_t
nbActuators
()
const
;
127
128
protected
:
129
std::shared_ptr<std::vector<
130
std::pair<std::shared_ptr<Actuator>, std::shared_ptr<Actuator>>>>
131
m_all
;
132
std::shared_ptr<std::vector<bool>>
m_isDofSet
;
133
std::shared_ptr<bool>
m_isClose
;
134
143
utils::Scalar
getTorqueMaxDirection
(
144
const
std::shared_ptr<Actuator>
actuator
,
145
const
rigidbody::GeneralizedCoordinates
& Q,
146
const
rigidbody::GeneralizedVelocity
& Qdot)
const
;
147
};
148
149
}
// namespace actuator
150
}
// namespace internal_forces
151
}
// namespace BIORBD_NAMESPACE
152
153
#endif
// BIORBD_ACTUATORS_ACTUATORS_H
BIORBD_NAMESPACE::internal_forces::actuator::Actuator
Class Actuator.
Definition
Actuator.h:21
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::nbActuators
size_t nbActuators() const
Return the toal number of actuators.
Definition
Actuators.cpp:282
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::Actuators
Actuators()
Construct actuators.
Definition
Actuators.cpp:24
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::torqueMax
std::pair< rigidbody::GeneralizedTorque, rigidbody::GeneralizedTorque > torqueMax(const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot)
Return two vectors of max torque (it is impossible to know if eccentric or concentric is required,...
Definition
Actuators.cpp:303
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::torque
rigidbody::GeneralizedTorque torque(const utils::Vector &activation, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot)
Return the generalized torque.
Definition
Actuators.cpp:286
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::actuator
const std::pair< std::shared_ptr< Actuator >, std::shared_ptr< Actuator > > & actuator(size_t dof)
Return a specific concentric/eccentric actuator.
Definition
Actuators.cpp:264
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::getTorqueMaxDirection
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 CasAD...
Definition
Actuators.cpp:442
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::m_isClose
std::shared_ptr< bool > m_isClose
If the set is ready.
Definition
Actuators.h:133
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::DeepCopy
void DeepCopy(const Actuators &other)
Deep copy of the actuator holder from other actuator holder.
Definition
Actuators.cpp:42
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::closeActuator
void closeActuator()
Indicate to biorbd to are done adding actuators, sanity checks are performed.
Definition
Actuators.cpp:245
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::m_isDofSet
std::shared_ptr< std::vector< bool > > m_isDofSet
If DoF all dof are set.
Definition
Actuators.h:132
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::addActuator
void addActuator(const Actuator &a)
Add an actuator to the set of actuators.
Definition
Actuators.cpp:138
BIORBD_NAMESPACE::internal_forces::actuator::Actuators::m_all
std::shared_ptr< std::vector< std::pair< std::shared_ptr< Actuator >, std::shared_ptr< Actuator > > > > m_all
All the actuators reunited /pair (+ or -).
Definition
Actuators.h:131
BIORBD_NAMESPACE::rigidbody::GeneralizedCoordinates
Class GeneralizedCoordinates.
Definition
GeneralizedCoordinates.h:15
BIORBD_NAMESPACE::rigidbody::GeneralizedTorque
Class GeneralizedTorque.
Definition
GeneralizedTorque.h:15
BIORBD_NAMESPACE::rigidbody::GeneralizedVelocity
Class GeneralizedVelocity.
Definition
GeneralizedVelocity.h:15
BIORBD_NAMESPACE::utils::Vector
Wrapper of the Eigen VectorXd.
Definition
Vector.h:21
include
InternalForces
Actuators
Actuators.h
Generated by
1.18.0