Biorbd Release_1.13.0
Loading...
Searching...
No Matches
IMU.cpp
1#define BIORBD_API_EXPORTS
2#include "RigidBody/IMU.h"
3
4#include "Utils/String.h"
5
6using namespace BIORBD_NAMESPACE;
7
9 : utils::RotoTransNode(),
10 m_technical(std::make_shared<bool>(isTechnical)),
11 m_anatomical(std::make_shared<bool>(isAnatomical)) {}
12
15 bool isTechnical,
16 bool isAnatomical)
17 : utils::RotoTransNode(RotoTrans),
18 m_technical(std::make_shared<bool>(isTechnical)),
19 m_anatomical(std::make_shared<bool>(isAnatomical)) {}
20
21#ifdef BIORBD_USE_CASADI_MATH
22
24 : utils::RotoTransNode(imu),
25 m_technical(std::make_shared<bool>(*imu.m_technical)),
26 m_anatomical(std::make_shared<bool>(*imu.m_anatomical)) {}
27
29 return rigidbody::IMU(
31 this->utils::RotoTransNode::operator*(other),
32 this->utils::Node::name(),
33 this->parent()),
34 this->isTechnical() && other.isTechnical(),
35 this->isAnatomical() && other.isAnatomical());
36}
37
38#endif
39
41 rigidbody::IMU copy;
42 copy.DeepCopy(*this);
43 return copy;
44}
45
46void rigidbody::IMU::DeepCopy(const IMU &other) {
48 *m_technical = *other.m_technical;
49 *m_anatomical = *other.m_anatomical;
50}
51
53
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
const String & name() const
Return the name of the node.
Definition Node.cpp:43
A RotoTrans which is attached to a segment.
RotoTransNode DeepCopy() const
Deep copy of a RotoTransNode.
RotoTransNode()
Construct a RotoTransNode.
RotoTrans operator*(const RotoTransNode &other) const
operator* Matrix multiplication
RotoTrans(const RigidBodyDynamics::Math::Matrix4d &matrix=RigidBodyDynamics::Math::Matrix4d::Identity())
Construct RotoTrans matrix.
Definition RotoTrans.cpp:14