Wheel.h
Go to the documentation of this file.
00001 /*+-------------------------------------------------------------------------+
00002   |                       MultiVehicle simulator (libmvsim)                 |
00003   |                                                                         |
00004   | Copyright (C) 2014  Jose Luis Blanco Claraco (University of Almeria)    |
00005   | Copyright (C) 2017  Borys Tymchenko (Odessa Polytechnic University)     |
00006   | Distributed under GNU General Public License version 3                  |
00007   |   See <http://www.gnu.org/licenses/>                                    |
00008   +-------------------------------------------------------------------------+ */
00009 
00010 #pragma once
00011 
00012 #include <mvsim/basic_types.h>
00013 
00014 #include <mrpt/poses/CPose2D.h>
00015 #include <mrpt/version.h>
00016 
00017 #if MRPT_VERSION < 0x199
00018 #include <mrpt/math/lightweight_geom_data.h>
00019 #include <mrpt/utils/TColor.h>
00020 using mrpt::utils::TColor;
00021 #else
00022 #include <mrpt/math/TPoint2D.h>
00023 #include <mrpt/math/TPose3D.h>
00024 #include <mrpt/math/TPolygon2D.h>
00025 #include <mrpt/img/TColor.h>
00026 using mrpt::img::TColor;
00027 #endif
00028 
00029 namespace mvsim
00030 {
00031 class DefaultFriction;
00032 class VehicleBase;
00033 class DynamicsDifferential;
00034 
00038 class Wheel
00039 {
00040    public:
00041         double x, y, yaw;  
00042 
00043         double diameter,
00044                 width;  
00045         double mass;  
00046         double Iyy;  
00047 
00048         TColor color;  
00049 
00050         Wheel();
00051         void getAs3DObject(mrpt::opengl::CSetOfObjects& obj);
00052         void loadFromXML(const rapidxml::xml_node<char>* xml_node);
00053 
00054         double getPhi() const
00055         {
00056                 return phi;
00057         }  
00058         void setPhi(double val)
00059         {
00060                 phi = val;
00061         }  
00062         double getW() const { return w; }  
00063         void setW(double val) { w = val; }  
00064         void recalcInertia();  
00065    protected:
00066         double phi, w;  
00067 
00068 };
00069 }  // namespace mvsim


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 22:08:35