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; }
153 void movementCommand (
double lin_vel,
double ang_vel );
165 void simulateInterval(
double At);
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.
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.
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.
const EIGEN_STRONG_INLINE AdjointReturnType t() const
Transpose.
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.
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.
This class can be used to simulate the kinematics and dynamics of a differential driven planar mobile...
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Tue Mar 3 09:15:16 UTC 2020 | | |