Biorbd Release_1.13.0
Loading...
Searching...
No Matches
IMU.h
1#ifndef BIORBD_RIGIDBODY_IMU_H
2#define BIORBD_RIGIDBODY_IMU_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7
8#include "Utils/RotoTransNode.h"
9
10namespace BIORBD_NAMESPACE {
11namespace utils {
12class String;
13}
14
15namespace rigidbody {
16
20#ifdef SWIG
21class BIORBD_API IMU
22#else
23class BIORBD_API IMU : public utils::RotoTransNode
24#endif
25{
26 public:
32 IMU(bool isTechnical = true, bool isAnatomical = true);
33
41 bool isTechnical = true,
42 bool isAnatomical = true);
43
44#ifdef BIORBD_USE_EIGEN3_MATH
49 template <typename OtherDerived>
50 IMU(const Eigen::MatrixBase<OtherDerived>& other)
51 : utils::RotoTransNode(other) {}
52#endif
53#ifdef BIORBD_USE_CASADI_MATH
54 IMU(const IMU& imu);
55
56 IMU operator*(const IMU& other) const;
57#endif
58
63 IMU DeepCopy() const;
64
69 void DeepCopy(const IMU& other);
70
75 bool isTechnical() const;
76
81 bool isAnatomical() const;
82
83#ifndef SWIG
84#ifdef BIORBD_USE_EIGEN3_MATH
90 template <typename OtherDerived>
91 IMU& operator=(const Eigen::MatrixBase<OtherDerived>& other) {
93 return *this;
94 }
95#endif
96#endif
97
98 protected:
99 std::shared_ptr<bool> m_technical;
100 std::shared_ptr<bool> m_anatomical;
101};
102
103} // namespace rigidbody
104} // namespace BIORBD_NAMESPACE
105
106#endif // BIORBD_RIGIDBODY_IMU_H
IMU(bool isTechnical=true, bool isAnatomical=true)
Construct inertial measurement unit.
Definition IMU.cpp:8
IMU DeepCopy() const
Deep copy of the IMU data.
Definition IMU.cpp:40
std::shared_ptr< bool > m_anatomical
It IMU is a anatomical IMU.
Definition IMU.h:100
bool isTechnical() const
Return if the IMU is technical.
Definition IMU.cpp:54
bool isAnatomical() const
Return if the IMU is anatomical.
Definition IMU.cpp:52
std::shared_ptr< bool > m_technical
If a IMU is a technical IMU.
Definition IMU.h:99
A RotoTrans which is attached to a segment.
RotoTrans operator*(const RotoTransNode &other) const
operator* Matrix multiplication
void operator=(const RotoTrans &other)
Assign a RotoTrans to this RotoTransNode (name and parent are reset).
RotoTrans(const RigidBodyDynamics::Math::Matrix4d &matrix=RigidBodyDynamics::Math::Matrix4d::Identity())
Construct RotoTrans matrix.
Definition RotoTrans.cpp:14
Wrapper around the std::string class with augmented functionality.
Definition String.h:18