Biorbd Release_1.13.0
Loading...
Searching...
No Matches
IMUs.h
1#ifndef BIORBD_RIGIDBODY_IMUS_H
2#define BIORBD_RIGIDBODY_IMUS_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7#include <vector>
8
9namespace BIORBD_NAMESPACE {
10namespace utils {
11class String;
12class Matrix;
13class RotoTransNode;
14} // namespace utils
15
16namespace rigidbody {
18class IMU;
22class BIORBD_API IMUs {
23 public:
27 IMUs();
28
33 IMUs(const IMUs& other);
34
38 virtual ~IMUs();
39
44 IMUs DeepCopy() const;
45
50 void DeepCopy(const IMUs& other);
51
52 // Set and get
53
59 void addIMU(bool technical = true, bool anatomical = true);
60
67 void addIMU(
68 const utils::RotoTransNode& RotoTrans,
69 bool technical = true,
70 bool anatomical = true);
71
76 size_t nbIMUs() const;
77
82 std::vector<utils::String> IMUsNames();
83
89 std::vector<utils::String> technicalIMUsNames();
90
96 std::vector<utils::String> anatomicalIMUsNames();
97
102 const std::vector<rigidbody::IMU>& IMU() const;
103
109 std::vector<rigidbody::IMU> IMU(const utils::String& segmentName);
110
116 const rigidbody::IMU& IMU(size_t idx);
117
125 std::vector<rigidbody::IMU> IMU(
126 const GeneralizedCoordinates& Q,
127 bool updateKin = true);
128
138 IMU(const GeneralizedCoordinates& Q, size_t idx, bool updateKin = true);
139
148 std::vector<rigidbody::IMU> segmentIMU(
149 const GeneralizedCoordinates& Q,
150 size_t idx,
151 bool updateKin = true);
152
157 size_t nbTechIMUs();
158
163 size_t nbAnatIMUs();
164
171 std::vector<rigidbody::IMU> technicalIMU(
172 const GeneralizedCoordinates& Q,
173 bool updateKin = true);
174
180 std::vector<rigidbody::IMU> technicalIMU();
181
188 std::vector<rigidbody::IMU> anatomicalIMU(
189 const GeneralizedCoordinates& Q,
190 bool updateKin = true);
191
197 std::vector<rigidbody::IMU> anatomicalIMU();
198
205 std::vector<utils::Matrix> IMUJacobian(
206 const GeneralizedCoordinates& Q,
207 bool updateKin = true);
208
216 std::vector<utils::Matrix> TechnicalIMUJacobian(
217 const GeneralizedCoordinates& Q,
218 bool updateKin = true);
219
220 protected:
229 std::vector<utils::Matrix> IMUJacobian(
230 const GeneralizedCoordinates& Q,
231 bool updateKin,
232 bool lookForTechnical);
233
234 std::shared_ptr<std::vector<rigidbody::IMU>>
236};
237
238} // namespace rigidbody
239} // namespace BIORBD_NAMESPACE
240
241#endif // BIORBD_RIGIDBODY_IMUS_H
std::vector< utils::String > technicalIMUsNames()
Return the names of the technical inertial measurement units (IMU).
Definition IMUs.cpp:241
std::vector< rigidbody::IMU > technicalIMU(const GeneralizedCoordinates &Q, bool updateKin=true)
Return all the technical inertial measurement units (IMU).
Definition IMUs.cpp:100
std::shared_ptr< std::vector< rigidbody::IMU > > m_IMUs
All the inertial Measurement Units.
Definition IMUs.h:235
std::vector< rigidbody::IMU > anatomicalIMU(const GeneralizedCoordinates &Q, bool updateKin=true)
Return all the anatomical inertial measurement units (IMU).
Definition IMUs.cpp:122
const std::vector< rigidbody::IMU > & IMU() const
Return all the IMU in the local reference of the segment.
Definition IMUs.cpp:55
size_t nbTechIMUs()
Return the number of technical inertial measurement units (IMU).
Definition IMUs.cpp:210
std::vector< utils::String > IMUsNames()
Return the names of the inertial measurement units (IMU).
Definition IMUs.cpp:232
IMUs DeepCopy() const
Deep copy of the inertial measurement units data.
Definition IMUs.cpp:27
std::vector< utils::Matrix > IMUJacobian(const GeneralizedCoordinates &Q, bool updateKin=true)
Return the jacobian of the inertial measurement units (IMU).
Definition IMUs.cpp:165
std::vector< utils::String > anatomicalIMUsNames()
Return the names of the anatomical inertial measurement units (IMU).
Definition IMUs.cpp:252
void addIMU(bool technical=true, bool anatomical=true)
Add a new inertial measurement unit to the set.
Definition IMUs.cpp:40
IMUs()
Construct inertial measurement units set.
Definition IMUs.cpp:18
size_t nbIMUs() const
Return the number of inertial measurement units (IMU) in the set.
Definition IMUs.cpp:52
std::vector< rigidbody::IMU > segmentIMU(const GeneralizedCoordinates &Q, size_t idx, bool updateKin=true)
Return all the inertial measurement units (IMU) on a specified segment.
Definition IMUs.cpp:143
std::vector< utils::Matrix > TechnicalIMUJacobian(const GeneralizedCoordinates &Q, bool updateKin=true)
Return the jacobian of the technical inertial measurement units (IMU).
Definition IMUs.cpp:172
size_t nbAnatIMUs()
Return the number of anatomical inertial measurement units (IMU).
Definition IMUs.cpp:221
A wrapper for the Eigen::MatrixXd.
Definition Matrix.h:18
A RotoTrans which is attached to a segment.
Wrapper around the std::string class with augmented functionality.
Definition String.h:18