10 #include <mrpt/img/TColor.h>
11 #include <mrpt/opengl/CCylinder.h>
12 #include <mrpt/opengl/CSetOfObjects.h>
13 #include <mrpt/opengl/stock_objects.h>
14 #include <mrpt/version.h>
22 using namespace mvsim;
39 gl_wheel->setColor_u8(
color);
40 gl_wheel->setPose(mrpt::poses::CPose3D(0, 0.5 *
width, 0, 0, 0, mrpt::DEG2RAD(90)));
44 auto gl_wheel_frame = mrpt::opengl::CSetOfObjects::Create();
45 gl_wheel_frame->setName(
"gl_wheel_frame");
46 gl_wheel_frame->insert(gl_wheel);
48 mrpt::opengl::CSetOfObjects::Ptr gl_xyz =
49 mrpt::opengl::stock_objects::CornerXYZSimple(0.9 *
diameter, 2.0);
50 #if MRPT_VERSION >= 0x270
51 gl_xyz->castShadows(
false);
53 gl_wheel_frame->insert(gl_xyz);
55 obj.insert(gl_wheel_frame);
59 obj.setPose(mrpt::math::TPose3D(
x,
y, 0.5 *
diameter,
yaw, 0.0, 0.0));
69 if (
const auto attr = xml_node->
first_attribute(
"pos"); attr && attr->value())
71 const std::string sAttr = attr->value();
72 mrpt::math::TPose2D v =
parseXYPHI(sAttr,
true);
79 const double INERTIA_NOT_SET = -1.;
80 this->
Iyy = INERTIA_NOT_SET;
99 [[maybe_unused]]
const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
100 [[maybe_unused]]
const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
101 [[maybe_unused]]
bool childrenOnly)
108 std::stringstream ss;
109 ss <<
"Pose on vehicle: " <<
pose().asString() <<
"\n"
111 <<
"Width: " <<
width <<
"\n"
112 <<
"Mass: " <<
mass <<
"\n"
113 <<
"Iyy: " <<
Iyy <<
"\n"
114 <<
"Kinematic status: phi:" << mrpt::RAD2DEG(
phi)
117 << mrpt::RAD2DEG(
w) <<
" deg/s\n";