rby1-sdk
Loading...
Searching...
No Matches
inertial.h
1#pragma once
2
3#include <Eigen/Core>
4
5#include "rby1-sdk/export.h"
6#include "rby1-sdk/math/se3.h"
7
8namespace rb::dyn {
9
10class Inertial;
11
12class RBY1_SDK_API Inertial {
13 public:
14 using MatrixType = Eigen::Matrix<double, 6, 6>;
15
16 static MatrixType I(double mass);
17
18 static MatrixType I(double mass, double ixx, double iyy, double izz,
19 const math::SE3::MatrixType& T = math::SE3::Identity());
20
21 static MatrixType I(double mass, double ixx, double iyy, double izz,
22 const Eigen::Vector3d& com);
23
24 static MatrixType I(double mass, double ixx, double iyy, double izz, double ixy, double ixz, double iyz,
25 const math::SE3::MatrixType& T = math::SE3::Identity());
26
27 static MatrixType I(double mass, double ixx, double iyy, double izz, double ixy, double ixz, double iyz,
28 const Eigen::Vector3d& com);
29
30 static MatrixType I(double mass, const Eigen::Vector3d& inertia,
31 const math::SE3::MatrixType& T = math::SE3::Identity());
32
33 static MatrixType I(double mass, const Eigen::Matrix<double, 6, 1>& inertia,
34 const math::SE3::MatrixType& T = math::SE3::Identity());
35
36 static MatrixType Transform(const math::SE3::MatrixType& T, const MatrixType& I);
37
38 static Eigen::Vector3d GetCOM(const MatrixType& I);
39
40 static double GetMass(const MatrixType& I);
41
42 // [I_{xx}, I_{yy}, I_{zz}, I_{xy}, I_{xz}, I_{yz}]^T
43 static Eigen::Vector<double, 6> GetInertia(const MatrixType& I);
44};
45
46} // namespace rb::dyn
Definition inertial.h:12