Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
mvsim::DynamicsAckermann Class Reference

#include <VehicleAckermann.h>

Inheritance diagram for mvsim::DynamicsAckermann:
Inheritance graph
[legend]

Classes

class  ControllerFrontSteerPID
 
class  ControllerRawForces
 
class  ControllerTwistFrontSteerPID
 
struct  TControllerInput
 
struct  TControllerOutput
 

Public Types

enum  { WHEEL_RL = 0, WHEEL_RR = 1, WHEEL_FL = 2, WHEEL_FR = 3 }
 
- Public Types inherited from mvsim::VehicleBase
typedef std::vector< SensorBase::PtrTListSensors
 

Public Member Functions

void computeFrontWheelAngles (const double desired_equiv_steer_ang, double &out_fl_ang, double &out_fr_ang) const
 
 DynamicsAckermann (World *parent)
 
double getMaxSteeringAngle () const
 
virtual vec3 getVelocityLocalOdoEstimate () const
 
void setMaxSteeringAngle (double val)
 
- Public Member Functions inherited from mvsim::VehicleBase
virtual void apply_force (double fx, double fy, double local_ptx=0.0, double local_pty=0.0)
 
void clearLogs ()
 
virtual void create_multibody_system (b2World *world)
 
b2BodygetBox2DChassisBody ()
 
mrpt::math::TPoint2D getChassisCenterOfMass () const
 In local coordinates (this excludes the mass of wheels) More...
 
virtual double getChassisMass () const
 
const mrpt::math::TPolygon2D & getChassisShape () const
 
mrpt::poses::CPose2D getCPose2D () const
 
std::shared_ptr< CSVLoggergetLoggerPtr (std::string logger_name)
 
virtual float getMaxVehicleRadius () const
 
const std::string & getName () const
 
size_t getNumWheels () const
 
const mrpt::math::TPose3D & getPose () const
 
const TListSensorsgetSensors () const
 
TListSensorsgetSensors ()
 
size_t getVehicleIndex () const
 
const vec3getVelocity () const
 
vec3 getVelocityLocal () const
 
const WheelgetWheelInfo (const size_t idx) const
 
WheelgetWheelInfo (const size_t idx)
 
void getWheelsVelocityLocal (std::vector< mrpt::math::TPoint2D > &vels, const vec3 &veh_vel_local) const
 
virtual void gui_update (mrpt::opengl::COpenGLScene &scene)
 
void newLogSession ()
 
void setPose (const mrpt::math::TPose3D &p) const
 
void setRecording (bool record)
 
void setVehicleIndex (size_t idx)
 
virtual void simul_post_timestep (const TSimulContext &context)
 
void simul_post_timestep_common (const TSimulContext &context)
 
virtual void simul_pre_timestep (const TSimulContext &context)
 
- Public Member Functions inherited from mvsim::VisualObject
WorldgetWorldObject ()
 
const WorldgetWorldObject () const
 
 VisualObject (World *parent)
 
virtual ~VisualObject ()
 

Protected Member Functions

virtual void dynamics_load_params_from_xml (const rapidxml::xml_node< char > *xml_node)
 
virtual void invoke_motor_controllers (const TSimulContext &context, std::vector< double > &out_force_per_wheel)
 
- Protected Member Functions inherited from mvsim::VehicleBase
void gui_update_common (mrpt::opengl::COpenGLScene &scene, bool defaultVehicleBody=true)
 
virtual void initLoggers ()
 
 VehicleBase (World *parent, size_t nWheels)
 
virtual void writeLogStrings ()
 

Private Attributes

ControllerBasePtr m_controller
 The installed controller. More...
 
double m_max_steer_ang
 

Controllers

typedef ControllerBaseTempl< DynamicsAckermannControllerBase
 
typedef std::shared_ptr< ControllerBaseControllerBasePtr
 
const ControllerBasePtrgetController () const
 
ControllerBasePtrgetController ()
 
virtual ControllerBaseInterfacegetControllerInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from mvsim::VehicleBase
static VehicleBasefactory (World *parent, const rapidxml::xml_node< char > *xml_node)
 
static VehicleBasefactory (World *parent, const std::string &xml_text)
 
static void register_vehicle_class (const rapidxml::xml_node< char > *xml_node)
 
- Protected Attributes inherited from mvsim::VehicleBase
std::string m_log_path
 
std::map< std::string, std::shared_ptr< CSVLogger > > m_loggers
 
std::string m_name
 User-supplied name of the vehicle (e.g. "r1", "veh1") More...
 
size_t m_vehicle_index
 
- Protected Attributes inherited from mvsim::VisualObject
Worldm_world
 

Detailed Description

Implementation of 4 wheels Ackermann-driven vehicles.

See also
class factory in VehicleBase::factory

Definition at line 36 of file VehicleAckermann.h.

Member Typedef Documentation

Virtual base for controllers of vehicles of type DynamicsAckermann

Definition at line 76 of file VehicleAckermann.h.

Definition at line 77 of file VehicleAckermann.h.

Member Enumeration Documentation

anonymous enum
Enumerator
WHEEL_RL 
WHEEL_RR 
WHEEL_FL 
WHEEL_FR 

Definition at line 41 of file VehicleAckermann.h.

Constructor & Destructor Documentation

DynamicsAckermann::DynamicsAckermann ( World parent)

Definition at line 23 of file VehicleAckermann.cpp.

Member Function Documentation

void DynamicsAckermann::computeFrontWheelAngles ( const double  desired_equiv_steer_ang,
double &  out_fl_ang,
double &  out_fr_ang 
) const

Computes the exact angles of the front wheels required to have an equivalent central steering angle. The method takes into account all wheels info & steering limits stored in the object.

Definition at line 202 of file VehicleAckermann.cpp.

void DynamicsAckermann::dynamics_load_params_from_xml ( const rapidxml::xml_node< char > *  xml_node)
protectedvirtual

The derived-class part of load_params_from_xml()

Implements mvsim::VehicleBase.

Definition at line 63 of file VehicleAckermann.cpp.

const ControllerBasePtr& mvsim::DynamicsAckermann::getController ( ) const
inline

Definition at line 159 of file VehicleAckermann.h.

ControllerBasePtr& mvsim::DynamicsAckermann::getController ( )
inline

Definition at line 160 of file VehicleAckermann.h.

virtual ControllerBaseInterface* mvsim::DynamicsAckermann::getControllerInterface ( )
inlinevirtual

Implements mvsim::VehicleBase.

Definition at line 161 of file VehicleAckermann.h.

double mvsim::DynamicsAckermann::getMaxSteeringAngle ( ) const
inline

The maximum steering angle (rad). Determines min turning radius

Definition at line 52 of file VehicleAckermann.h.

vec3 DynamicsAckermann::getVelocityLocalOdoEstimate ( ) const
virtual

Gets the current estimation of odometry-based velocity as reconstructed solely from wheels spinning velocities and geometry. This is the input of any realistic low-level controller onboard.

See also
getVelocityLocal()

Implements mvsim::VehicleBase.

Definition at line 228 of file VehicleAckermann.cpp.

void DynamicsAckermann::invoke_motor_controllers ( const TSimulContext context,
std::vector< double > &  out_force_per_wheel 
)
protectedvirtual

Implements mvsim::VehicleBase.

Definition at line 174 of file VehicleAckermann.cpp.

void mvsim::DynamicsAckermann::setMaxSteeringAngle ( double  val)
inline

Definition at line 53 of file VehicleAckermann.h.

Member Data Documentation

ControllerBasePtr mvsim::DynamicsAckermann::m_controller
private

The installed controller.

Definition at line 188 of file VehicleAckermann.h.

double mvsim::DynamicsAckermann::m_max_steer_ang
private

The maximum steering angle (rad). Determines

Definition at line 190 of file VehicleAckermann.h.


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


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 19:36:41