17 #ifndef GAZEBO_PHYSICS_INERTIAL_HH_ 18 #define GAZEBO_PHYSICS_INERTIAL_HH_ 30 #include <ignition/math/Vector3.hh> 31 #include <ignition/math/Quaternion.hh> 32 #include <ignition/math/Matrix3.hh> 47 class InertialPrivate;
61 public:
explicit Inertial(
const double _mass);
72 public:
void Load(sdf::ElementPtr _sdf);
76 public:
void UpdateParameters(sdf::ElementPtr _sdf);
83 public:
void SetMass(
const double _m);
91 public:
double Mass()
const;
100 public:
void SetInertiaMatrix(
101 const double _ixx,
const double _iyy,
const double _izz,
102 const double _ixy,
const double _ixz,
const double iyz);
108 public:
void SetCoG(
const double _cx,
const double _cy,
const double _cz);
117 public:
void SetCoG(
const ignition::math::Vector3d &_center);
127 public:
void SetCoG(
const double _cx,
const double _cy,
const double _cz,
128 const double _rx,
const double _ry,
const double _rz);
137 public:
void SetCoG(
const ignition::math::Pose3d &_c);
146 public:
const ignition::math::Vector3d &CoG()
const;
157 public: ignition::math::Pose3d Pose()
const;
166 public:
const ignition::math::Vector3d &PrincipalMoments()
const;
175 public:
const ignition::math::Vector3d &ProductsOfInertia()
const;
184 public:
double IXX()
const;
193 public:
double IYY()
const;
202 public:
double IZZ()
const;
211 public:
double IXY()
const;
220 public:
double IXZ()
const;
229 public:
double IYZ()
const;
233 public:
void SetIXX(
const double _v);
237 public:
void SetIYY(
const double _v);
241 public:
void SetIZZ(
const double _v);
245 public:
void SetIXY(
const double _v);
249 public:
void SetIXZ(
const double _v);
253 public:
void SetIYZ(
const double _v);
262 public:
void Rotate(
const ignition::math::Quaterniond &_rot);
285 public:
void ProcessMsg(
const msgs::Inertial &_msg);
307 public: ignition::math::Matrix3d MOI(
308 const ignition::math::Pose3d &_pose)
const;
326 const ignition::math::Pose3d &_frameOffset)
const;
335 const ignition::math::Vector3d &_frameOffset)
const;
343 _out <<
"Mass[" << _inertial.
Mass() <<
"] CoG[" 344 << _inertial.
CoG() <<
"]\n";
361 public: ignition::math::Matrix3d MOI()
const;
370 public:
void SetMOI(
const ignition::math::Matrix3d &_moi);
374 private: std::unique_ptr<InertialPrivate> dataPtr;
const ignition::math::Vector3d & PrincipalMoments() const
Get the principal moments of inertia (Ixx, Iyy, Izz).
Forward declarations for the common classes.
Definition: Animation.hh:33
const ignition::math::Vector3d & ProductsOfInertia() const
Get the products of inertia (Ixy, Ixz, Iyz).
Encapsulates a position and rotation in three space.
Definition: Pose.hh:42
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
const ignition::math::Vector3d & CoG() const
Get the center of gravity.
A 3x3 matrix class.
Definition: Matrix3.hh:40
double Mass() const
Get the mass.
A class for inertial information about a link.
Definition: Inertial.hh:54
friend std::ostream & operator<<(std::ostream &_out, const gazebo::physics::Inertial &_inertial)
Output operator.
Definition: Inertial.hh:340
A quaternion class.
Definition: Quaternion.hh:48
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302