Biorbd
Actuator.h
1 #ifndef BIORBD_ACTUATORS_ACTUATOR_H
2 #define BIORBD_ACTUATORS_ACTUATOR_H
3 
4 #include <memory>
5 #include "biorbdConfig.h"
6 #include "Actuators/ActuatorEnums.h"
7 #include "Utils/Scalar.h"
8 
9 namespace biorbd {
10 namespace utils {
11 class String;
12 }
13 
14 namespace actuator {
15 
19 class BIORBD_API Actuator
20 {
21 public:
22 
26  Actuator();
27 
32  Actuator(
33  const biorbd::actuator::Actuator& other);
34 
40  Actuator(
41  int direction,
42  unsigned int dofIdx);
43 
50  Actuator(
51  int direction,
52  unsigned int dofIdx,
53  const biorbd::utils::String &jointName);
54 
58  virtual ~Actuator();
59 
64  void DeepCopy(
65  const biorbd::actuator::Actuator& other);
66 
71  unsigned int index() const;
72 
77  int direction() const;
78 
83  biorbd::actuator::TYPE type() const;
84 
89  virtual biorbd::utils::Scalar torqueMax() = 0;
90 
91 protected:
95  virtual void setType() = 0;
96 
97  std::shared_ptr<biorbd::actuator::TYPE> m_type;
98  std::shared_ptr<int> m_direction;
99 
100  std::shared_ptr<biorbd::utils::String> m_jointName;
101  std::shared_ptr<unsigned int> m_dofIdx;
102 
103 };
104 
105 }}
106 
107 #endif // BIORBD_ACTUATORS_ACTUATOR_H
biorbd::actuator::Actuator::m_type
std::shared_ptr< biorbd::actuator::TYPE > m_type
The type of the actuator.
Definition: Actuator.h:97
biorbd::actuator::Actuator
Class Actuator.
Definition: Actuator.h:20
biorbd::actuator::Actuator::m_jointName
std::shared_ptr< biorbd::utils::String > m_jointName
Name of the parent joint.
Definition: Actuator.h:100
biorbd::actuator::Actuator::torqueMax
virtual biorbd::utils::Scalar torqueMax()=0
Return the maximal torque.
biorbd::actuator::Actuator::m_dofIdx
std::shared_ptr< unsigned int > m_dofIdx
Index of the DoF associated with the actuator.
Definition: Actuator.h:101
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17
biorbd::actuator::Actuator::setType
virtual void setType()=0
Set the type of actuator.
biorbd::actuator::Actuator::m_direction
std::shared_ptr< int > m_direction
The direction of the actuator (+1 or -1)
Definition: Actuator.h:98