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; }
153 void movementCommand (
double lin_vel,
double ang_vel );
165 void simulateInterval(
double At);
double x() const
Common members of all points & poses classes.
double v
Instantaneous velocity of the robot (linear, m/s)
double getT()
Read the instantaneous, error-free status of the simulated robot.
double w
Instantaneous velocity of the robot (angular, rad/s)
void getOdometry(mrpt::math::TPose2D &pose) const
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
void setV(double v)
Set actual robot pose (inmediately, without simulating the movement along time) (Not to be called nor...
void resetOdometry(const mrpt::poses::CPose2D &newOdo=mrpt::poses::CPose2D())
Forces odometry to be set to a specified values.
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
mrpt::poses::CPose2D m_pose
Global, absolute and error-free robot coordinates.
void resetTime()
Reset time counter.
void getRealPose(mrpt::poses::CPose2D &pose) const
Reads the real robot pose.
double getV()
Read the instantaneous, error-free status of the simulated robot.
void getOdometry(mrpt::poses::CPose2D &pose) const
Reads the simulated robot odometry (this is NOT equal to the actual error-free robot coordinates).
float cTAU
The time-constants for the first order low-pass filter for the velocities changes.
mrpt::poses::CPose2D m_odometry
Used to simulate odometry (with optional error)
double DEG2RAD(const double x)
Degrees to radians.
double getY()
Read the instantaneous, error-free status of the simulated robot.
void getRealPose(mrpt::math::TPose2D &pose) const
Reads the real robot pose.
double t
Simulation time variable.
bool usar_error_odometrico
Whether to corrupt odometry with noise.
double getX() const
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.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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.
A class used to store a 2D pose.
double getW()
Read the instantaneous, error-free status of the simulated robot.
double getPHI()
Read the instantaneous, error-free status of the simulated robot.
const double & phi() const
Get the phi angle of the 2D pose (in radians)
void setRealPose(const mrpt::poses::CPose2D &p)
Reset actual robot pose (inmediately, without simulating the movement along time)
float cDELAY
The delay constant for the velocities changes.
This class can be used to simulate the kinematics and dynamics of a differential driven planar mobile...