Biorbd Release_1.13.0
Loading...
Searching...
No Matches
GeneralizedTorque.h
1#ifndef BIORBD_UTILS_GENERALIZED_TORQUE_H
2#define BIORBD_UTILS_GENERALIZED_TORQUE_H
3
4#include "biorbdConfig.h"
5
6#include "Utils/Vector.h"
7
8namespace BIORBD_NAMESPACE {
9namespace rigidbody {
10class Joints;
11
15class BIORBD_API GeneralizedTorque : public utils::Vector {
16 public:
21
26 GeneralizedTorque(size_t nTorque);
27
32 GeneralizedTorque(const Joints& j);
33
39
44 GeneralizedTorque(const RigidBodyDynamics::Math::VectorNd& v);
45
46#ifdef BIORBD_USE_EIGEN3_MATH
47
52 template <typename OtherDerived>
53 GeneralizedTorque(const Eigen::MatrixBase<OtherDerived>& other)
54 : utils::Vector(other) {}
55
56#endif
57
58#ifdef BIORBD_USE_CASADI_MATH
59
64 GeneralizedTorque(const casadi::MX& v);
65
66#endif
67
68#ifndef SWIG
69
70#ifdef BIORBD_USE_EIGEN3_MATH
71
77 template <typename OtherDerived>
78 GeneralizedTorque& operator=(const Eigen::MatrixBase<OtherDerived>& other) {
79 this->utils::Vector::operator=(other);
80 return *this;
81 }
82
83#endif
84
89 void operator=(const utils::Vector& other);
90#ifdef BIORBD_USE_CASADI_MATH
91
96 void operator=(const RBDLCasadiMath::MX_Xd_SubMatrix& other);
97
102 void operator=(const casadi::MX& other);
103#endif
104
105#endif
106};
107
108} // namespace rigidbody
109} // namespace BIORBD_NAMESPACE
110
111#endif // BIORBD_UTILS_GENERALIZED_TORQUE_H
GeneralizedTorque()
Construct generalized torque.
void operator=(const utils::Vector &other)
operator= For submatrices
This is the core of the musculoskeletal model in biorbd.
Definition Joints.h:48
Wrapper of the Eigen VectorXd.
Definition Vector.h:21
void operator=(const Vector &other)
operator= For submatrices
Definition Vector.cpp:83