Go to the documentation of this file.
9 #ifndef CRobotSimulator_H
10 #define CRobotSimulator_H
93 cDELAY = CMD_delay_sec;
101 double Ax_err_bias = 1e-6,
102 double Ax_err_std = 10e-6,
103 double Ay_err_bias = 1e-6,
104 double Ay_err_std = 10e-6,
105 double Aphi_err_bias =
DEG2RAD(1e-6),
106 double Aphi_err_std =
DEG2RAD(10e-6)
109 usar_error_odometrico=enabled;
110 m_Ax_err_bias=Ax_err_bias;
111 m_Ax_err_std=Ax_err_std;
112 m_Ay_err_bias=Ay_err_bias;
113 m_Ay_err_std=Ay_err_std;
114 m_Aphi_err_bias=Aphi_err_bias;
115 m_Aphi_err_std=Aphi_err_std;
124 double getX()
const {
return m_pose.
x(); }
128 double getY() {
return m_pose.
y(); }
148 void setV(
double v) { this->v=v; }
149 void setW(
double w) { this->w=w; }
void getOdometry(mrpt::math::TPose2D &pose) const
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
double getV()
Read the instantaneous, error-free status of the simulated 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.
double w
Instantaneous velocity of the robot (angular, rad/s)
void getOdometry(mrpt::poses::CPose2D &pose) const
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
void setRealPose(const mrpt::poses::CPose2D &p)
Reset actual robot pose (inmediately, without simulating the movement along time)
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.
const double & phi() const
Get the phi angle of the 2D pose (in radians)
double getX() const
Read the instantaneous, error-free status of the simulated robot.
CRobotSimulator(float TAU=0, float DELAY=0)
Constructor with default dynamic model-parameters.
void getRealPose(mrpt::math::TPose2D &pose) const
Reads the real robot pose.
mrpt::poses::CPose2D m_odometry
Used to simulate odometry (with optional error)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void simulateInterval(double At)
This method must be called periodically to simulate discrete time intervals.
mrpt::poses::CPose2D m_pose
Global, absolute and error-free robot coordinates.
double getW()
Read the instantaneous, error-free status of the simulated robot.
void resetTime()
Reset time counter.
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
void resetStatus()
Reset all the simulator variables to 0 (All but current simulator time).
void getRealPose(mrpt::poses::CPose2D &pose) const
Reads the real robot pose.
double v
Instantaneous velocity of the robot (linear, m/s)
double DEG2RAD(const double x)
Degrees to radians.
A class used to store a 2D pose.
double x() const
Common members of all points & poses classes.
double t
Simulation time variable.
void setV(double v)
Set actual robot pose (inmediately, without simulating the movement along time) (Not to be called nor...
double Command_Time
Dynamic limitations of the robot.
bool usar_error_odometrico
Whether to corrupt odometry with noise
double getY()
Read the instantaneous, error-free status of the simulated robot.
float cTAU
The time-constants for the first order low-pass filter for the velocities changes.
double getT()
Read the instantaneous, error-free status of the simulated robot.
float cDELAY
The delay constant for the velocities changes.
virtual ~CRobotSimulator()
Destructor.
void resetOdometry(const mrpt::poses::CPose2D &newOdo=mrpt::poses::CPose2D())
Forces odometry to be set to a specified values.
double getPHI()
Read the instantaneous, error-free status of the simulated robot.
void movementCommand(double lin_vel, double ang_vel)
Used to command the robot a desired movement (velocities)
This class can be used to simulate the kinematics and dynamics of a differential driven planar mobile...
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |