Main MRPT website > C++ reference for MRPT 1.5.5
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: - All rights reserved. |
7  | Released under BSD License. See details in |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CRobotSimulator_H
10 #define CRobotSimulator_H
11 #warning mrpt::utils::CRobotSimulator is deprecated and will be removed. Use mrpt::kinematics::CVehicleSimul_DiffDriven instead.
13 namespace mrpt
14 {
15  namespace utils
16  {
18  {
19  public:
20  CRobotSimulator(float TAU=0, float DELAY=0){setDelayModelParams(TAU,DELAY);}
21  void getOdometry(poses::CPose2D &pose) const {pose = getCurrentOdometricPose();}
22  void getRealPose(poses::CPose2D &pose) const {pose = getCurrentGTPose();}
23  void getOdometry(math::TPose2D &pose) const {pose = getCurrentOdometricPose();}
24  void getRealPose(math::TPose2D &pose) const {pose = getCurrentGTPose();}
26  void setRealPose(const math::TPose2D &pose) {setCurrentGTPose(pose);}
27  double getX() const{return getCurrentGTPose().x;}
28  double getY() const{return getCurrentGTPose().y;}
29  double getPHI() const{return getCurrentGTPose().phi;}
30  double getT() const{return getTime();}
31  void simulateInterval(double At){ simulateOneTimeStep(At);}
33  };
34  }
35 }
36 #endif
void getRealPose(math::TPose2D &pose) const
CRobotSimulator(float TAU=0, float DELAY=0)
void getOdometry(poses::CPose2D &pose) const
void simulateOneTimeStep(const double dt)
Runs the simulator during "dt" seconds.
void setCurrentOdometricPose(const T &pose)
Brute-force overwrite robot odometry.
const mrpt::math::TPose2D & getCurrentGTPose() const
Returns the instantaneous, ground truth pose in world coordinates.
Simulates the kinematics of a differential-driven planar mobile robot/vehicle, including odometry err...
double getTime() const
Get the current simulation time.
void getOdometry(math::TPose2D &pose) const
double y
X,Y coordinates.
void simulateInterval(double At)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:36
void setOdometry(const math::TPose2D &pose)
void resetOdometry(const poses::CPose2D pose=poses::CPose2D())
Lightweight 2D pose.
void getRealPose(poses::CPose2D &pose) const
void setDelayModelParams(double TAU_delay_sec=1.8, double CMD_delay_sec=0.)
Change the model of delays used for the orders sent to the robot.
void setCurrentGTPose(const mrpt::math::TPose2D &pose)
Brute-force move robot to target coordinates ("teleport")
void setRealPose(const math::TPose2D &pose)
const mrpt::math::TPose2D & getCurrentOdometricPose() const
Returns the current pose according to (noisy) odometry.
double phi
Orientation (rads)

Page generated by Doxygen 1.8.14 for MRPT 1.5.5 Git: e06b63dbf Fri Dec 1 14:41:11 2017 +0100 at lun oct 28 01:31:35 CET 2019