Biorbd Release_1.13.0
Loading...
Searching...
No Matches
ActuatorConstant.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/Actuators/ActuatorConstant.h"
3
4#include "RigidBody/GeneralizedCoordinates.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : Actuator(), m_Tmax(std::make_shared<utils::Scalar>(0)) {
11 setType();
12}
13
17
19 int direction,
20 const utils::Scalar &Tmax,
21 size_t dofIdx)
22 : Actuator(direction, dofIdx),
23 m_Tmax(std::make_shared<utils::Scalar>(Tmax)) {
24 setType();
25}
26
28 int direction,
29 const utils::Scalar &Tmax,
30 size_t dofIdx,
31 const utils::String &jointName)
32 : Actuator(direction, dofIdx, jointName),
33 m_Tmax(std::make_shared<utils::Scalar>(Tmax)) {
34 setType();
35}
36
43
49
53
55 *m_type = internal_forces::actuator::TYPE::CONSTANT;
56}
Class ActuatorConstant is a joint actuator type which maximum is contant.
virtual utils::Scalar torqueMax()
Return the maximal torque.
std::shared_ptr< utils::Scalar > m_Tmax
Maximal torque that can be done.
virtual void setType()
Set the type of the constant actuator.
ActuatorConstant DeepCopy() const
Deep copy of the constant actuator.
void DeepCopy(const Actuator &other)
Deep copy of actuator.
Definition Actuator.cpp:48
int direction() const
Return the direction of the actuator.
Definition Actuator.cpp:58
std::shared_ptr< TYPE > m_type
The type of the actuator.
Definition Actuator.h:90
Wrapper around the std::string class with augmented functionality.
Definition String.h:18