Main MRPT website > C++ reference for MRPT 1.5.9
CRobotSimulator.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
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.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020