#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 | setDelayModelParams (float TAU_delay_sec=1.8f, float CMD_delay_sec=0.3f) |
Change the model of delays used for the orders sent to the robot. | |
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 | setRealPose (mrpt::poses::CPose2D &p) |
Reset actual robot pose (inmediately, without simulating the movement along time). | |
double | getX () const |
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 (const mrpt::poses::CPose2D &newOdo=mrpt::poses::CPose2D()) |
Forces odometry to be set to a specified values. | |
void | getOdometry (CPose2D &pose) const |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates). | |
void | getOdometry (TPose2D &pose) const |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates). | |
void | getRealPose (CPose2D &pose) const |
Reads the real robot pose. | |
void | getRealPose (TPose2D &pose) const |
Reads the real robot pose. | |
Private Attributes | |
mrpt::poses::CPose2D | m_pose |
Global, absolute and error-free robot coordinates. | |
mrpt::poses::CPose2D | m_odometry |
Used to simulate odometry (with optional error). | |
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. | |
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 58 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 | ( | TPose2D & | pose | ) | const [inline] |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
Definition at line 203 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::getOdometry | ( | CPose2D & | pose | ) | const [inline] |
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
Definition at line 196 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::getPHI | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 152 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::getRealPose | ( | TPose2D & | pose | ) | const [inline] |
void mrpt::slam::CRobotSimulator::getRealPose | ( | CPose2D & | pose | ) | const [inline] |
double mrpt::slam::CRobotSimulator::getT | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 156 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::getV | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 160 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::getW | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 163 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::getX | ( | ) | const [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 144 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::getY | ( | ) | [inline] |
Read the instantaneous, error-free status of the simulated robot.
Definition at line 148 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 | ( | const mrpt::poses::CPose2D & | newOdo = mrpt::poses::CPose2D() |
) | [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::setDelayModelParams | ( | float | TAU_delay_sec = 1.8f , |
|
float | CMD_delay_sec = 0.3f | |||
) | [inline] |
Change the model of delays used for the orders sent to the robot.
Definition at line 111 of file CRobotSimulator.h.
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::setRealPose | ( | mrpt::poses::CPose2D & | p | ) | [inline] |
Reset actual robot pose (inmediately, without simulating the movement along time).
Definition at line 140 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 168 of file CRobotSimulator.h.
void mrpt::slam::CRobotSimulator::setW | ( | double | w | ) | [inline] |
Definition at line 169 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 87 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_v [private] |
Definition at line 87 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_v0 [private] |
Definition at line 87 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_w [private] |
Definition at line 87 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::Command_w0 [private] |
Definition at line 87 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 92 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Aphi_err_bias [private] |
Definition at line 99 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Aphi_err_std [private] |
Definition at line 99 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ax_err_bias [private] |
Definition at line 97 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ax_err_std [private] |
Definition at line 97 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ay_err_bias [private] |
Definition at line 98 of file CRobotSimulator.h.
double mrpt::slam::CRobotSimulator::m_Ay_err_std [private] |
Definition at line 98 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 72 of file CRobotSimulator.h.
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 22:58:25 EDT 2009 |