Public Member Functions | Public Attributes | Protected Attributes | List of all members
mvsim::Wheel Class Reference

#include <Wheel.h>

Public Member Functions

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 loadFromXML (const rapidxml::xml_node< char > *xml_node)
 
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 ()
 

Public Attributes

mrpt::img::TColor color {0xff323232}
 
double diameter = .4
 
double Iyy = 1.0
 
const TParameterDefinitions m_params
 
double mass = 2.0
 [kg] More...
 
double width = .2
 
double x = 0
 
double y = -0.5
 
double yaw = 0
 

Protected Attributes

double phi = 0
 
double w = 0
 

Detailed Description

Common info for 2D wheels, for usage in derived classes. Wheels are modeled as a mass with a rectangular shape.

Definition at line 29 of file Wheel.h.

Constructor & Destructor Documentation

Wheel::Wheel ( )

Definition at line 23 of file Wheel.cpp.

Member Function Documentation

void Wheel::getAs3DObject ( mrpt::opengl::CSetOfObjects obj)

Definition at line 25 of file Wheel.cpp.

double mvsim::Wheel::getPhi ( ) const
inline

Orientation (rad) wrt vehicle local frame.

Definition at line 61 of file Wheel.h.

double mvsim::Wheel::getW ( ) const
inline

Spinning velocity (rad/s) wrt shaft.

Definition at line 69 of file Wheel.h.

void Wheel::loadFromXML ( const rapidxml::xml_node< char > *  xml_node)

Definition at line 48 of file Wheel.cpp.

void Wheel::recalcInertia ( )

Recompute Iyy from mass, diameter and height.

Definition at line 79 of file Wheel.cpp.

void mvsim::Wheel::setPhi ( double  val)
inline

Orientation (rad) wrt vehicle local frame.

Definition at line 65 of file Wheel.h.

void mvsim::Wheel::setW ( double  val)
inline

Spinning velocity (rad/s) wrt shaft.

Definition at line 70 of file Wheel.h.

Member Data Documentation

mrpt::img::TColor mvsim::Wheel::color {0xff323232}

Color for OpenGL rendering

Definition at line 47 of file Wheel.h.

double mvsim::Wheel::diameter = .4

Length(diameter) and width of the wheel rectangle [m]

Definition at line 39 of file Wheel.h.

double mvsim::Wheel::Iyy = 1.0

Inertia: computed automatically from geometry at constructor and at loadFromXML(), but can be overrided.

Definition at line 44 of file Wheel.h.

const TParameterDefinitions mvsim::Wheel::m_params
Initial value:
= {
{"mass", {"%lf", &mass}},
{"width", {"%lf", &width}},
{"diameter", {"%lf", &diameter}},
{"color", {"%color", &color}},
{"inertia", {"%lf", &Iyy}}}

Definition at line 49 of file Wheel.h.

double mvsim::Wheel::mass = 2.0

[kg]

Definition at line 40 of file Wheel.h.

double mvsim::Wheel::phi = 0
protected

Angular position and velocity of the wheel as it spins over its shaft (rad, rad/s)

Definition at line 75 of file Wheel.h.

double mvsim::Wheel::w = 0
protected

Definition at line 75 of file Wheel.h.

double mvsim::Wheel::width = .2

Definition at line 39 of file Wheel.h.

double mvsim::Wheel::x = 0

Location of the wheel wrt the chassis ref point [m,rad] (in local coords)

Definition at line 36 of file Wheel.h.

double mvsim::Wheel::y = -0.5

Definition at line 36 of file Wheel.h.

double mvsim::Wheel::yaw = 0

Definition at line 36 of file Wheel.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52