TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
inertia.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_INERTIA_INERTIA_H_
2#define INCLUDE_TINYURDF_INERTIA_INERTIA_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include <string>
7#include <ostream>
8#include <memory>
9
10#include <loguru/loguru.hpp>
11
12#include "utils.h"
13#include "pose.h"
14#include "property_base.h"
15#include "geometry_base.h"
16
22class Inertia : public PropertyBase, public GeometryBase {
23 public:
24 Inertia();
25 Inertia(double mass, double ixx, double ixy, double ixz,
26 double iyy, double iyz, double izz);
27 bool isA(const char* name) override;
28 bool validate() const override;
29 void clear() override;
30 void print(std::ostream& os) override;
31 const char* getTypename() override;
32 bool empty() const override;
33 void setOrigin(double x, double y, double z) override;
34 void getOrigin(double* xyz) const override;
35 void setMass(const double m);
36 void setIxx(double ixx_);
37 void setIxy(double ixy_);
38 void setIxz(double ixz_);
39 void setIyy(double iyy_);
40 void setIyz(double iyz_);
41 void setIzz(double izz_);
42 private:
43 std::shared_ptr<Pose> origin;
44 double mass;
45 double ixx, ixy, ixz, iyy, iyz, izz;
46};
47
48#endif // INCLUDE_TINYURDF_INERTIA_INERTIA_H_
Definition geometry_base.h:9
Represents the inertia of an object. The inertia is defined with respect to a given origin and the co...
Definition inertia.h:22
const char * getTypename() override
Definition inertia.cc:53
void print(std::ostream &os) override
Definition inertia.cc:45
void setMass(const double m)
Definition inertia.cc:74
bool isA(const char *name) override
Definition inertia.cc:13
void setIzz(double izz_)
Definition inertia.cc:104
bool empty() const override
Definition inertia.cc:58
void setIyz(double iyz_)
Definition inertia.cc:99
Inertia()
Definition inertia.cc:3
bool validate() const override
Definition inertia.cc:17
void getOrigin(double *xyz) const override
Definition inertia.cc:68
void setIyy(double iyy_)
Definition inertia.cc:94
void setIxx(double ixx_)
Definition inertia.cc:79
void clear() override
Definition inertia.cc:39
void setOrigin(double x, double y, double z) override
Definition inertia.cc:63
void setIxz(double ixz_)
Definition inertia.cc:89
void setIxy(double ixy_)
Definition inertia.cc:84
Definition property_base.h:9