29 const double final_t =
m_time + dt;
mrpt::math::TTwist2D m_odometric_vel
Velocity in (x,y,omega)
mrpt::math::TPose2D m_odometry
void rotate(const double ang)
Transform the (vx,vy) components for a counterclockwise rotation of ang radians.
void simulateOneTimeStep(const double dt)
Runs the simulator during "dt" seconds.
double m_time
simulation running time
mrpt::math::TPose2D m_GT_pose
ground truth pose in world coordinates.
CVehicleSimulVirtualBase()
virtual void internal_simulControlStep(const double dt)=0
mrpt::math::TTwist2D m_GT_vel
Velocity in (x,y,omega)
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
void wrapToPiInPlace(T &a)
Modifies the given angle to translate it into the ]-pi,pi] range.
mrpt::math::TTwist2D getCurrentOdometricVelLocal() const
Returns the instantaneous, odometric velocity vector (vx,vy,omega) in the robot local frame...
double vx
Velocity components: X,Y (m/s)
mrpt::math::TTwist2D getCurrentGTVelLocal() const
Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in the robot local frame...
void resetTime()
Reset all simulator variables to 0 (except the.
void setCurrentGTPose(const mrpt::math::TPose2D &pose)
Brute-force move robot to target coordinates ("teleport")
bool m_use_odo_error
Whether to corrupt odometry with noise.
double m_firmware_control_period
The period at which the low-level controller updates velocities (Default: 0.5 ms) ...
virtual ~CVehicleSimulVirtualBase()
CRandomGenerator & getRandomGenerator()
A static instance of a CRandomGenerator class, for use in single-thread applications.
double phi
Orientation (rads)
double omega
Angular velocity (rad/s)
double drawGaussian1D_normalized()
Generate a normalized (mean=0, std=1) normally distributed sample.
virtual void internal_clear()=0
Resets all pending cmds.