#include <mrpt/slam/CRobotSimulator.h>
Public Member Functions | |
CRobotSimulator (float TAU=1.9f, float DELAY=0.3f) | |
Constructor with default dynamic model-parameters. | |
virtual | ~CRobotSimulator () |
Destructor. | |
void | SetOdometryErrors (bool enabled, double Ax_err_bias=1e-6, double Ax_err_std=10e-6, double Ay_err_bias=1e-6, double Ay_err_std=10e-6, double Aphi_err_bias=DEG2RAD(1e-6), double Aphi_err_std=DEG2RAD(10e-6)) |
Enable/Disable odometry errors Errors in odometry are introduced per millisecond. | |
void | SetX (double X) |
Reset actual robot pose (inmediately, without simulating the movement along time). | |
void | SetY (double Y) |
Reset actual robot pose (inmediately, without simulating the movement along time). | |
void | SetPHI (double PHI) |
Reset actual robot pose (inmediately, without simulating the movement along time). | |
double | GetX () |
Read the instantaneous, error-free status of the simulated robot. | |
double | GetY () |
Read the instantaneous, error-free status of the simulated robot. | |
double | GetPHI () |
Read the instantaneous, error-free status of the simulated robot. | |
double | GetT () |
Read the instantaneous, error-free status of the simulated robot. | |
double | GetV () |
Read the instantaneous, error-free status of the simulated robot. | |
double | GetW () |
Read the instantaneous, error-free status of the simulated robot. | |
void | SetV (double v) |
Set actual robot pose (inmediately, without simulating the movement along time) (Not to be called normally!!). | |
void | SetW (double w) |
void | MovementCommand (double lin_vel, double ang_vel) |
Used to command the robot a desired movement (velocities). | |
void | ResetStatus () |
Reset all the simulator variables to 0 (All but current simulator time). | |
void | ResetTime () |
Reset time counter. | |
void | SimulateInterval (double At) |
This method must be called periodically to simulate discrete time intervals. | |
void | ResetOdometry (double x, double y, double phi) |
Forces odometry to be set to a specified values. | |
void | GetOdometry (float *x, float *y, float *phi) |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates). | |
void | GetOdometry (CPose2D &pose) |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates). | |
void | GetRealPose (CPose2D &pose) |
Reads the real robot pose. | |
Private Attributes | |
double | X |
Global, absolute and error-free robot coordinates. | |
double | Y |
double | PHI |
double | v |
Instantaneous velocity of the robot (linear, m/s). | |
double | w |
Instantaneous velocity of the robot (angular, rad/s). | |
double | t |
Simulation time variable. | |
double | odo_x |
Used to simulate odometry (with optional error). | |
double | odo_y |
double | odo_phi |
bool | usar_error_odometrico |
Whether to corrupt odometry with noise. | |
double | Command_Time |
Dynamic limitations of the robot. | |
double | Command_v |
double | Command_w |
double | Command_v0 |
double | Command_w0 |
float | cTAU |
The time-constants for the first order low-pass filter for the velocities changes. | |
float | cDELAY |
The delay constant for the velocities changes. | |
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 |
The main methods are:
Versions:
Definition at line 56 of file CRobotSimulator.h.
mrpt::slam::CRobotSimulator::CRobotSimulator | ( | float | TAU = 1.9f , |
|
float | DELAY = 0.3f | |||
) |
Constructor with default dynamic model-parameters.
virtual mrpt::slam::CRobotSimulator::~CRobotSimulator | ( | ) | [virtual] |
Destructor.
void mrpt::slam::CRobotSimulator::GetOdometry | ( | CPose2D & | pose | ) | [inline] |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
Definition at line 211 of file CRobotSimulator.h.
References mrpt::poses::CPose2D::phi, mrpt::poses::CPoseOrPoint::x, and mrpt::poses::CPoseOrPoint::y.
void mrpt::slam::CRobotSimulator::GetOdometry | ( | float * | x, | |
float * | y, | |||
float * | phi | |||
) | [inline] |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
Definition at line 201 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::GetPHI | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 156 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::GetRealPose | ( | CPose2D & | pose | ) | [inline] |
Reads the real robot pose.
Definition at line 221 of file CRobotSimulator.h.
References mrpt::poses::CPose2D::phi, mrpt::poses::CPoseOrPoint::x, and mrpt::poses::CPoseOrPoint::y.
double mrpt::slam::CRobotSimulator::GetT | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 159 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::GetV | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 163 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::GetW | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 166 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::GetX | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 150 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::GetY | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 153 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::MovementCommand | ( | double | lin_vel, | |
double | ang_vel | |||
) |
Used to command the robot a desired movement (velocities).
void mrpt::slam::CRobotSimulator::ResetOdometry | ( | double | x, | |
double | y, | |||
double | phi | |||
) | [inline] |
void mrpt::slam::CRobotSimulator::ResetStatus | ( | ) |
Reset all the simulator variables to 0 (All but current simulator time).
void mrpt::slam::CRobotSimulator::ResetTime | ( | ) | [inline] |
void mrpt::slam::CRobotSimulator::SetOdometryErrors | ( | bool | enabled, | |
double | Ax_err_bias = 1e-6 , |
|||
double | Ax_err_std = 10e-6 , |
|||
double | Ay_err_bias = 1e-6 , |
|||
double | Ay_err_std = 10e-6 , |
|||
double | Aphi_err_bias = DEG2RAD(1e-6) , |
|||
double | Aphi_err_std = DEG2RAD(10e-6) | |||
) | [inline] |
Enable/Disable odometry errors Errors in odometry are introduced per millisecond.
Definition at line 119 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SetPHI | ( | double | PHI | ) | [inline] |
Reset actual robot pose (inmediately, without simulating the movement along time).
Definition at line 146 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SetV | ( | double | v | ) | [inline] |
Set actual robot pose (inmediately, without simulating the movement along time) (Not to be called normally!!).
Definition at line 171 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SetW | ( | double | w | ) | [inline] |
Definition at line 172 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SetX | ( | double | X | ) | [inline] |
Reset actual robot pose (inmediately, without simulating the movement along time).
Definition at line 140 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SetY | ( | double | Y | ) | [inline] |
Reset actual robot pose (inmediately, without simulating the movement along time).
Definition at line 143 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::SimulateInterval | ( | double | At | ) |
This method must be called periodically to simulate discrete time intervals.
float mrpt::slam::CRobotSimulator::cDELAY [private] |
double mrpt::slam::CRobotSimulator::Command_Time [private] |
Dynamic limitations of the robot.
Approximation to non-infinity motor forces: A first order low-pass filter, using: Command_Time: Time "t" when the last order was received. Command_v, Command_w: The user-desired velocities. Command_v0, Command_w0: Actual robot velocities at the moment of user request.
Definition at line 91 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_v [private] |
Definition at line 91 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_v0 [private] |
Definition at line 91 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_w [private] |
Definition at line 91 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_w0 [private] |
Definition at line 91 of file CRobotSimulator.h.
float mrpt::slam::CRobotSimulator::cTAU [private] |
The time-constants for the first order low-pass filter for the velocities changes.
Definition at line 97 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Aphi_err_bias [private] |
Definition at line 105 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Aphi_err_std [private] |
Definition at line 105 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ax_err_bias [private] |
Definition at line 103 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ax_err_std [private] |
Definition at line 103 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ay_err_bias [private] |
Definition at line 104 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ay_err_std [private] |
Definition at line 104 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::odo_phi [private] |
Definition at line 79 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::odo_x [private] |
double mrpt::slam::CRobotSimulator::odo_y [private] |
Definition at line 79 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::PHI [private] |
Definition at line 63 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::t [private] |
bool mrpt::slam::CRobotSimulator::usar_error_odometrico [private] |
double mrpt::slam::CRobotSimulator::v [private] |
double mrpt::slam::CRobotSimulator::w [private] |
Instantaneous velocity of the robot (angular, rad/s).
Definition at line 71 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::X [private] |
double mrpt::slam::CRobotSimulator::Y [private] |
Definition at line 63 of file CRobotSimulator.h.
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:14:51 EST 2009 |