Biorbd Release_1.13.0
Loading...
Searching...
No Matches
Actuator.h
1#ifndef BIORBD_ACTUATORS_ACTUATOR_H
2#define BIORBD_ACTUATORS_ACTUATOR_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7
8#include "InternalForces/Actuators/ActuatorEnums.h"
9#include "Utils/Scalar.h"
10
11namespace BIORBD_NAMESPACE {
12namespace utils {
13class String;
14}
15namespace internal_forces {
16namespace actuator {
17
21class BIORBD_API Actuator {
22 public:
26 Actuator();
27
32 Actuator(const Actuator& other);
33
39 Actuator(int direction, size_t dofIdx);
40
47 Actuator(int direction, size_t dofIdx, const utils::String& jointName);
48
52 virtual ~Actuator();
53
58 void DeepCopy(const Actuator& other);
59
64 size_t index() const;
65
70 int direction() const;
71
76 TYPE type() const;
77
82 virtual utils::Scalar torqueMax() = 0;
83
84 protected:
88 virtual void setType() = 0;
89
90 std::shared_ptr<TYPE> m_type;
91 std::shared_ptr<int>
93
94 std::shared_ptr<utils::String> m_jointName;
95 std::shared_ptr<size_t>
97};
98
99} // namespace actuator
100} // namespace internal_forces
101} // namespace BIORBD_NAMESPACE
102
103#endif // BIORBD_ACTUATORS_ACTUATOR_H
std::shared_ptr< utils::String > m_jointName
Name of the parent joint.
Definition Actuator.h:94
void DeepCopy(const Actuator &other)
Deep copy of actuator.
Definition Actuator.cpp:48
virtual void setType()=0
Set the type of actuator.
std::shared_ptr< int > m_direction
The direction of the actuator (+1 or -1).
Definition Actuator.h:92
TYPE type() const
Return the type of the actuator.
Definition Actuator.cpp:62
int direction() const
Return the direction of the actuator.
Definition Actuator.cpp:58
virtual utils::Scalar torqueMax()=0
Return the maximal torque.
std::shared_ptr< TYPE > m_type
The type of the actuator.
Definition Actuator.h:90
size_t index() const
Return the index of the DoF associated with actuator.
Definition Actuator.cpp:56
std::shared_ptr< size_t > m_dofIdx
Index of the DoF associated with the actuator.
Definition Actuator.h:96
Wrapper around the std::string class with augmented functionality.
Definition String.h:18