Biorbd
IMUs.h
1 #ifndef BIORBD_RIGIDBODY_IMUS_H
2 #define BIORBD_RIGIDBODY_IMUS_H
3 
4 #include <vector>
5 #include <memory>
6 #include "biorbdConfig.h"
7 
8 namespace biorbd {
9 namespace utils {
10 class String;
11 class Matrix;
12 class RotoTransNode;
13 }
14 
15 namespace rigidbody {
16 class GeneralizedCoordinates;
17 class IMU;
21 class BIORBD_API IMUs
22 {
23 public:
27  IMUs();
28 
33  IMUs(
34  const biorbd::rigidbody::IMUs& other);
35 
39  virtual ~IMUs();
40 
45  biorbd::rigidbody::IMUs DeepCopy() const;
46 
51  void DeepCopy(
52  const biorbd::rigidbody::IMUs& other);
53 
54  // Set and get
55 
61  void addIMU(
62  bool technical = true,
63  bool anatomical = true);
64 
71  void addIMU(
72  const biorbd::utils::RotoTransNode &RotoTrans,
73  bool technical = true,
74  bool anatomical = true);
75 
80  unsigned int nbIMUs() const;
81 
86  std::vector<biorbd::utils::String> IMUsNames();
87 
92  std::vector<biorbd::utils::String> technicalIMUsNames();
93 
98  std::vector<biorbd::utils::String> anatomicalIMUsNames();
99 
100 
105  const std::vector<biorbd::rigidbody::IMU>& IMU() const;
106 
112  std::vector<biorbd::rigidbody::IMU> IMU(
113  const biorbd::utils::String& segmentName);
114 
121  unsigned int idx);
122 
129  std::vector<biorbd::rigidbody::IMU> IMU(
131  bool updateKin = true);
132 
142  unsigned int idx,
143  bool updateKin = true);
144 
152  std::vector<biorbd::rigidbody::IMU> segmentIMU(
154  unsigned int idx,
155  bool updateKin = true);
156 
161  unsigned int nbTechIMUs();
162 
167  unsigned int nbAnatIMUs();
168 
175  std::vector<biorbd::rigidbody::IMU> technicalIMU(
177  bool updateKin = true);
178 
183  std::vector<biorbd::rigidbody::IMU> technicalIMU();
184 
191  std::vector<biorbd::rigidbody::IMU> anatomicalIMU(
193  bool updateKin = true);
194 
199  std::vector<biorbd::rigidbody::IMU> anatomicalIMU();
200 
207  std::vector<biorbd::utils::Matrix> IMUJacobian(
209  bool updateKin = true);
210 
217  std::vector<biorbd::utils::Matrix> TechnicalIMUJacobian(
219  bool updateKin = true);
220 
221 protected:
222 
229  std::vector<biorbd::utils::Matrix> IMUJacobian(
231  bool updateKin,
232  bool lookForTechnical);
233 
234  std::shared_ptr<std::vector<biorbd::rigidbody::IMU>> m_IMUs;
235 
236 };
237 
238 }}
239 
240 #endif // BIORBD_RIGIDBODY_IMUS_H
biorbd::rigidbody::IMU
Class IMU.
Definition: IMU.h:23
biorbd::rigidbody::GeneralizedCoordinates
Class GeneralizedCoordinates.
Definition: GeneralizedCoordinates.h:15
biorbd::utils::RotoTransNode
A RotoTrans which is attached to a segment.
Definition: RotoTransNode.h:16
biorbd::rigidbody::IMUs
Hold a set of IMUs.
Definition: IMUs.h:22
biorbd::rigidbody::IMUs::m_IMUs
std::shared_ptr< std::vector< biorbd::rigidbody::IMU > > m_IMUs
All the inertial Measurement Units.
Definition: IMUs.h:234
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17