Main MRPT website > C++ reference for MRPT 1.5.3
List of all members | Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions
mrpt::kinematics::CVehicleSimul_Holo Class Reference

Detailed Description

Kinematic simulator of a holonomic 2D robot capable of moving in any direction, with "blended" velocity profiles.

See CVehicleSimul_Holo::sendVelCmd() for a description of the velocity commands in this kinematic model.

Definition at line 22 of file CVehicleSimul_Holo.h.

#include <mrpt/kinematics/CVehicleSimul_Holo.h>

Inheritance diagram for mrpt::kinematics::CVehicleSimul_Holo:
Inheritance graph

Classes

struct  TVelRampCmd
 

Public Types

typedef CVehicleVelCmd_Holo kinematic_cmd_t
 

Public Member Functions

 CVehicleSimul_Holo ()
 
void sendVelRampCmd (double vel, double dir, double ramp_time, double rot_speed)
 Sends a velocity cmd to the holonomic robot. More...
 
void sendVelCmd (const CVehicleVelCmd &cmd_vel) MRPT_OVERRIDE
 Sends a velocity command to the robot. More...
 
CVehicleVelCmdPtr getVelCmdType () const MRPT_OVERRIDE
 Gets an empty velocity command object that can be queried to find out the number of velcmd components,... More...
 
Kinematic simulation and control interface
void simulateOneTimeStep (const double dt)
 Runs the simulator during "dt" seconds. More...
 
const mrpt::math::TPose2DgetCurrentGTPose () const
 Returns the instantaneous, ground truth pose in world coordinates. More...
 
void setCurrentGTPose (const mrpt::math::TPose2D &pose)
 Brute-force move robot to target coordinates ("teleport") More...
 
const mrpt::math::TPose2DgetCurrentOdometricPose () const
 Returns the current pose according to (noisy) odometry. More...
 
template<typename T >
void setCurrentOdometricPose (const T &pose)
 Brute-force overwrite robot odometry. More...
 
const mrpt::math::TTwist2DgetCurrentGTVel () const
 Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in world coordinates. More...
 
mrpt::math::TTwist2D getCurrentGTVelLocal () const
 Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in the robot local frame. More...
 
const mrpt::math::TTwist2DgetCurrentOdometricVel () const
 Returns the instantaneous, odometric velocity vector (vx,vy,omega) in world coordinates. More...
 
mrpt::math::TTwist2D getCurrentOdometricVelLocal () const
 Returns the instantaneous, odometric velocity vector (vx,vy,omega) in the robot local frame. More...
 
double getTime () const
 Get the current simulation time. More...
 
void setOdometryErrors (bool enabled, double Ax_err_bias=1e-3, double Ax_err_std=10e-3, double Ay_err_bias=1e-3, double Ay_err_std=10e-3, double Aphi_err_bias=mrpt::utils::DEG2RAD(1e-3), double Aphi_err_std=mrpt::utils::DEG2RAD(10e-3))
 Enable/Disable odometry errors. More...
 
void resetStatus ()
 
void resetTime ()
 Reset all simulator variables to 0 (except the simulation time). More...
 

Protected Attributes

double m_firmware_control_period
 The period at which the low-level controller updates velocities (Default: 0.5 ms) More...
 
bool m_use_odo_error
 Whether to corrupt odometry with noise. More...
 
double m_Ax_err_bias
 
double m_Ax_err_std
 
double m_Ay_err_bias
 
double m_Ay_err_std
 
double m_Aphi_err_bias
 
double m_Aphi_err_std
 
State vector
double m_time
 simulation running time More...
 
mrpt::math::TPose2D m_GT_pose
 ground truth pose in world coordinates. More...
 
mrpt::math::TTwist2D m_GT_vel
 Velocity in (x,y,omega) More...
 
mrpt::math::TTwist2D m_odometric_vel
 Velocity in (x,y,omega) More...
 
mrpt::math::TPose2D m_odometry
 

Private Member Functions

void internal_simulControlStep (const double dt) MRPT_OVERRIDE
 
void internal_clear () MRPT_OVERRIDE
 Resets all pending cmds. More...
 

Private Attributes

Vel ramp cmds
TVelRampCmd m_vel_ramp_cmd
 the last cmd received from the user. More...
 

Member Typedef Documentation

◆ kinematic_cmd_t

Definition at line 25 of file CVehicleSimul_Holo.h.

Constructor & Destructor Documentation

◆ CVehicleSimul_Holo()

mrpt::kinematics::CVehicleSimul_Holo::CVehicleSimul_Holo ( )

Member Function Documentation

◆ getCurrentGTPose()

const mrpt::math::TPose2D& mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTPose ( ) const
inlineinherited

◆ getCurrentGTVel()

const mrpt::math::TTwist2D& mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTVel ( ) const
inlineinherited

Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in world coordinates.

Definition at line 54 of file CVehicleSimulVirtualBase.h.

Referenced by mrpt::nav::CRobot2NavInterfaceForSimulator_Holo::getCurrentPoseAndSpeeds(), and mrpt::nav::CRobot2NavInterfaceForSimulator_DiffDriven::getCurrentPoseAndSpeeds().

◆ getCurrentGTVelLocal()

mrpt::math::TTwist2D mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTVelLocal ( ) const
inherited

Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in the robot local frame.

◆ getCurrentOdometricPose()

const mrpt::math::TPose2D& mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricPose ( ) const
inlineinherited

◆ getCurrentOdometricVel()

const mrpt::math::TTwist2D& mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricVel ( ) const
inlineinherited

Returns the instantaneous, odometric velocity vector (vx,vy,omega) in world coordinates.

Definition at line 59 of file CVehicleSimulVirtualBase.h.

◆ getCurrentOdometricVelLocal()

mrpt::math::TTwist2D mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricVelLocal ( ) const
inherited

Returns the instantaneous, odometric velocity vector (vx,vy,omega) in the robot local frame.

◆ getTime()

double mrpt::kinematics::CVehicleSimulVirtualBase::getTime ( ) const
inlineinherited

◆ getVelCmdType()

CVehicleVelCmdPtr mrpt::kinematics::CVehicleSimul_Holo::getVelCmdType ( ) const
inlinevirtual

Gets an empty velocity command object that can be queried to find out the number of velcmd components,...

Implements mrpt::kinematics::CVehicleSimulVirtualBase.

Definition at line 42 of file CVehicleSimul_Holo.h.

◆ internal_clear()

void mrpt::kinematics::CVehicleSimul_Holo::internal_clear ( )
privatevirtual

Resets all pending cmds.

Implements mrpt::kinematics::CVehicleSimulVirtualBase.

◆ internal_simulControlStep()

void mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep ( const double  dt)
privatevirtual

◆ resetStatus()

void mrpt::kinematics::CVehicleSimulVirtualBase::resetStatus ( )
inherited

◆ resetTime()

void mrpt::kinematics::CVehicleSimulVirtualBase::resetTime ( )
inherited

Reset all simulator variables to 0 (except the simulation time).

See also
resetTime Reset time counter
resetStatus

◆ sendVelCmd()

void mrpt::kinematics::CVehicleSimul_Holo::sendVelCmd ( const CVehicleVelCmd cmd_vel)
inlinevirtual

◆ sendVelRampCmd()

void mrpt::kinematics::CVehicleSimul_Holo::sendVelRampCmd ( double  vel,
double  dir,
double  ramp_time,
double  rot_speed 
)

Sends a velocity cmd to the holonomic robot.

Parameters
[in]velLinear speed (m/s)
[in]dirDirection (rad) (In the odometry frame of reference)
[in]ramp_timeBlend the cmd during this period (seconds)
[in]rot_speedRotational speed while there is heading error and to this constant (rad/s)

Referenced by mrpt::nav::CRobot2NavInterfaceForSimulator_Holo::stop().

◆ setCurrentGTPose()

void mrpt::kinematics::CVehicleSimulVirtualBase::setCurrentGTPose ( const mrpt::math::TPose2D pose)
inherited

Brute-force move robot to target coordinates ("teleport")

Referenced by mrpt::utils::CRobotSimulator::setRealPose().

◆ setCurrentOdometricPose()

template<typename T >
void mrpt::kinematics::CVehicleSimulVirtualBase::setCurrentOdometricPose ( const T &  pose)
inlineinherited

Brute-force overwrite robot odometry.

Definition at line 51 of file CVehicleSimulVirtualBase.h.

Referenced by mrpt::utils::CRobotSimulator::resetOdometry(), and mrpt::utils::CRobotSimulator::setOdometry().

◆ setOdometryErrors()

void mrpt::kinematics::CVehicleSimulVirtualBase::setOdometryErrors ( bool  enabled,
double  Ax_err_bias = 1e-3,
double  Ax_err_std = 10e-3,
double  Ay_err_bias = 1e-3,
double  Ay_err_std = 10e-3,
double  Aphi_err_bias = mrpt::utils::DEG2RAD(1e-3),
double  Aphi_err_std = mrpt::utils::DEG2RAD(10e-3) 
)
inlineinherited

Enable/Disable odometry errors.

Errors in odometry are 1 sigma Gaussian values per second

Definition at line 74 of file CVehicleSimulVirtualBase.h.

◆ simulateOneTimeStep()

void mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep ( const double  dt)
inherited

Runs the simulator during "dt" seconds.

It will be split into periods of "m_firmware_control_period".

Referenced by mrpt::utils::CRobotSimulator::simulateInterval().

Member Data Documentation

◆ m_Aphi_err_bias

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Aphi_err_bias
protectedinherited

Definition at line 112 of file CVehicleSimulVirtualBase.h.

◆ m_Aphi_err_std

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Aphi_err_std
protectedinherited

Definition at line 112 of file CVehicleSimulVirtualBase.h.

◆ m_Ax_err_bias

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Ax_err_bias
protectedinherited

Definition at line 110 of file CVehicleSimulVirtualBase.h.

◆ m_Ax_err_std

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Ax_err_std
protectedinherited

Definition at line 110 of file CVehicleSimulVirtualBase.h.

◆ m_Ay_err_bias

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Ay_err_bias
protectedinherited

Definition at line 111 of file CVehicleSimulVirtualBase.h.

◆ m_Ay_err_std

double mrpt::kinematics::CVehicleSimulVirtualBase::m_Ay_err_std
protectedinherited

Definition at line 111 of file CVehicleSimulVirtualBase.h.

◆ m_firmware_control_period

double mrpt::kinematics::CVehicleSimulVirtualBase::m_firmware_control_period
protectedinherited

The period at which the low-level controller updates velocities (Default: 0.5 ms)

Definition at line 107 of file CVehicleSimulVirtualBase.h.

◆ m_GT_pose

mrpt::math::TPose2D mrpt::kinematics::CVehicleSimulVirtualBase::m_GT_pose
protectedinherited

ground truth pose in world coordinates.

Definition at line 102 of file CVehicleSimulVirtualBase.h.

◆ m_GT_vel

mrpt::math::TTwist2D mrpt::kinematics::CVehicleSimulVirtualBase::m_GT_vel
protectedinherited

Velocity in (x,y,omega)

Definition at line 103 of file CVehicleSimulVirtualBase.h.

◆ m_odometric_vel

mrpt::math::TTwist2D mrpt::kinematics::CVehicleSimulVirtualBase::m_odometric_vel
protectedinherited

Velocity in (x,y,omega)

Definition at line 104 of file CVehicleSimulVirtualBase.h.

◆ m_odometry

mrpt::math::TPose2D mrpt::kinematics::CVehicleSimulVirtualBase::m_odometry
protectedinherited

Definition at line 105 of file CVehicleSimulVirtualBase.h.

◆ m_time

double mrpt::kinematics::CVehicleSimulVirtualBase::m_time
protectedinherited

simulation running time

Definition at line 101 of file CVehicleSimulVirtualBase.h.

◆ m_use_odo_error

bool mrpt::kinematics::CVehicleSimulVirtualBase::m_use_odo_error
protectedinherited

Whether to corrupt odometry with noise.

Definition at line 109 of file CVehicleSimulVirtualBase.h.

◆ m_vel_ramp_cmd

TVelRampCmd mrpt::kinematics::CVehicleSimul_Holo::m_vel_ramp_cmd
private

the last cmd received from the user.

Definition at line 57 of file CVehicleSimul_Holo.h.




Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Mon Oct 30 10:27:08 UTC 2017