#include <Wheel.h>
Public Member Functions | |
std::string | asString () const |
void | getAs3DObject (mrpt::opengl::CSetOfObjects &obj) |
double | getPhi () const |
Orientation (rad) wrt vehicle local frame. More... | |
double | getW () const |
Spinning velocity (rad/s) wrt shaft. More... | |
void | internalGuiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly) override |
void | loadFromXML (const rapidxml::xml_node< char > *xml_node) |
mrpt::math::TPose3D | pose () const |
void | recalcInertia () |
Recompute Iyy from mass, diameter and height. More... | |
void | setPhi (double val) |
Orientation (rad) wrt vehicle local frame. More... | |
void | setW (double val) |
Spinning velocity (rad/s) wrt shaft. More... | |
Wheel (World *world) | |
![]() | |
const std::optional< Shape2p5 > & | collisionShape () const |
void | customVisualVisible (const bool visible) |
bool | customVisualVisible () const |
virtual void | guiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical) |
World * | parent () |
const World * | parent () const |
void | showCollisionShape (bool show) |
VisualObject (World *parent, bool insertCustomVizIntoViz=true, bool insertCustomVizIntoPhysical=true) | |
virtual | ~VisualObject () |
Public Attributes | |
mrpt::img::TColor | color {0xff323232} |
double | diameter = .4 |
double | Iyy = 1.0 |
std::string | linked_yaw_object_name |
double | linked_yaw_offset = .0 |
double | mass = 2.0 |
[kg] More... | |
const TParameterDefinitions | params_ |
double | width = .2 |
double | x = 0 |
double | y = -0.5 |
double | yaw = 0 |
Protected Attributes | |
double | phi = 0 |
double | w = 0 |
![]() | |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCollision_ |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCustomVisual_ |
int32_t | glCustomVisualId_ = -1 |
const bool | insertCustomVizIntoPhysical_ = true |
const bool | insertCustomVizIntoViz_ = true |
World * | world_ |
Additional Inherited Members | |
![]() | |
static void | FreeOpenGLResources () |
![]() | |
static double | GeometryEpsilon = 1e-3 |
![]() | |
void | addCustomVisualization (const mrpt::opengl::CRenderizable::Ptr &glModel, const mrpt::poses::CPose3D &modelPose={}, const float modelScale=1.0f, const std::string &modelName="group", const std::optional< std::string > &modelURI=std::nullopt, const bool initialShowBoundingBox=false) |
bool | parseVisual (const rapidxml::xml_node< char > &rootNode) |
Returns true if there is at least one <visual>...</visual> entry. More... | |
bool | parseVisual (const JointXMLnode<> &rootNode) |
void | setCollisionShape (const Shape2p5 &cs) |
Common info for 2D wheels, for usage in derived classes. Wheels are modeled as a mass with a rectangular shape.
std::string Wheel::asString | ( | ) | const |
void Wheel::getAs3DObject | ( | mrpt::opengl::CSetOfObjects & | obj | ) |
|
inline |
|
inline |
|
overridevirtual |
Implements mvsim::VisualObject.
void Wheel::loadFromXML | ( | const rapidxml::xml_node< char > * | xml_node | ) |
|
inline |
void Wheel::recalcInertia | ( | ) |
|
inline |
|
inline |
mrpt::img::TColor mvsim::Wheel::color {0xff323232} |
double mvsim::Wheel::diameter = .4 |
double mvsim::Wheel::Iyy = 1.0 |
Inertia: computed automatically from geometry at constructor and at loadFromXML(), but can be overrided.
std::string mvsim::Wheel::linked_yaw_object_name |
const TParameterDefinitions mvsim::Wheel::params_ |
|
protected |
double mvsim::Wheel::x = 0 |