12 #include <mrpt/img/TColor.h>
13 #include <mrpt/math/TPoint2D.h>
14 #include <mrpt/math/TPolygon2D.h>
15 #include <mrpt/math/TPose3D.h>
16 #include <mrpt/poses/CPose2D.h>
17 #include <mvsim/TParameterDefinitions.h>
18 #include <mvsim/VisualObject.h>
19 #include <mvsim/basic_types.h>
23 class DefaultFriction;
25 class DynamicsDifferential;
40 double x = 0, y = -0.5, yaw = 0;
43 mrpt::math::TPose3D
pose()
const {
return {
x, y, 0, yaw, 0, 0}; }
54 mrpt::img::TColor
color{0xff323232};
61 double linked_yaw_offset = .0;
63 const TParameterDefinitions params_ = {
64 {
"mass", {
"%lf", &
mass}},
65 {
"width", {
"%lf", &width}},
67 {
"color", {
"%color", &
color}},
68 {
"inertia", {
"%lf", &
Iyy}},
70 {
"linked_yaw_offset_deg", {
"%lf_deg", &linked_yaw_offset}}};
78 void getAs3DObject(mrpt::opengl::CSetOfObjects& obj,
bool isPhysicalScene);
81 void internalGuiUpdate(
82 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
83 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
bool childrenOnly)
override;
87 double getW()
const {
return w; }
88 void setW(
double val) { w = val; }
93 double phi = 0, w = 0;
Definition: VisualObject.h:36
double getW() const
Spinning velocity (rad/s) wrt shaft.
Definition: Wheel.h:87
double mass
[kg]
Definition: Wheel.h:47
double x
Definition: Wheel.h:40
double getPhi() const
Orientation (rad) wrt vehicle local frame.
Definition: Wheel.h:85
void recalcInertia()
Recompute Iyy from mass, diameter and height.
void setW(double val)
Spinning velocity (rad/s) wrt shaft.
Definition: Wheel.h:88
mrpt::math::TPose3D pose() const
Definition: Wheel.h:43
std::string asString() const
double diameter
Definition: Wheel.h:46
mrpt::img::TColor color
Definition: Wheel.h:54
std::string linked_yaw_object_name
Definition: Wheel.h:60
void setPhi(double val)
Orientation (rad) wrt vehicle local frame.
Definition: Wheel.h:86
double Iyy
Definition: Wheel.h:51
double phi
Definition: Wheel.h:93