51 m_simul.
sendVelRampCmd(0.0 , 0 , isEmergencyStop ? 0.1 : 1.0 , 0.0 );
69 relative_heading_radians,
77 return m_simul.
getTime()-m_simul_time_start;
81 m_simul_time_start = m_simul.
getTime();
138 return m_simul.
getTime()-m_simul_time_start;
142 m_simul_time_start = m_simul.
getTime();
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
int signWithZero(T x)
Returns the sign of X as "0", "1" or "-1".
mrpt::kinematics::CVehicleVelCmdPtr getEmergencyStopCmd() MRPT_OVERRIDE
Gets the emergency stop command for the current robot.
mrpt::kinematics::CVehicleVelCmdPtr getAlignCmd(const double relative_heading_radians) MRPT_OVERRIDE
Gets a motion command to make the robot to align with a given relative heading, without translating...
void resetNavigationTimer() MRPT_OVERRIDE
See CRobot2NavInterface::resetNavigationTimer()
bool stop(bool isEmergencyStop) MRPT_OVERRIDE
Stop the robot right now.
bool stop(bool isEmergencyStop) MRPT_OVERRIDE
Stop the robot right now.
double DEG2RAD(const double x)
Degrees to radians.
void resetNavigationTimer() MRPT_OVERRIDE
See CRobot2NavInterface::resetNavigationTimer()
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
double m_simul_time_start
for getNavigationTime
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
void sendVelRampCmd(double vel, double dir, double ramp_time, double rot_speed)
Sends a velocity cmd to the holonomic robot.
double getNavigationTime() MRPT_OVERRIDE
See CRobot2NavInterface::getNavigationTime().
mrpt::kinematics::CVehicleSimul_Holo & m_simul
const mrpt::math::TTwist2D & getCurrentGTVel() const
Returns the instantaneous, ground truth velocity vector (vx,vy,omega) in world coordinates.
const mrpt::math::TPose2D & getCurrentGTPose() const
Returns the instantaneous, ground truth pose in world coordinates.
Virtual base for velocity commands of different kinematic models of planar mobile robot...
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
CRobot2NavInterface implemented for a simulator object based on mrpt::kinematics::CVehicleSimul_DiffD...
CRobot2NavInterfaceForSimulator_DiffDriven(mrpt::kinematics::CVehicleSimul_DiffDriven &simul)
void sendVelCmd(const CVehicleVelCmd &cmd_vel) MRPT_OVERRIDE
Sends a velocity command to the robot.
Simulates the kinematics of a differential-driven planar mobile robot/vehicle, including odometry err...
double getTime() const
Get the current simulation time.
double getNavigationTime() MRPT_OVERRIDE
See CRobot2NavInterface::getNavigationTime().
GLsizei const GLchar ** string
virtual bool changeSpeeds(const mrpt::kinematics::CVehicleVelCmd &vel_cmd) MRPT_OVERRIDE
Sends a velocity command to the robot.
void setToStop() MRPT_OVERRIDE
Set to a command that means "do not move" / "stop".
mrpt::kinematics::CVehicleVelCmdPtr getStopCmd() MRPT_OVERRIDE
Gets the emergency stop command for the current robot.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Kinematic simulator of a holonomic 2D robot capable of moving in any direction, with "blended" veloci...
double m_simul_time_start
for getNavigationTime
bool getCurrentPoseAndSpeeds(mrpt::math::TPose2D &curPose, mrpt::math::TTwist2D &curVel, mrpt::system::TTimeStamp ×tamp, mrpt::math::TPose2D &curOdometry, std::string &frame_id) MRPT_OVERRIDE
Get the current pose and velocity of the robot.
CRobot2NavInterface implemented for a simulator object based on mrpt::kinematics::CVehicleSimul_Holo...
mrpt::kinematics::CVehicleSimul_DiffDriven & m_simul
mrpt::kinematics::CVehicleVelCmdPtr getEmergencyStopCmd() MRPT_OVERRIDE
Gets the emergency stop command for the current robot.
bool getCurrentPoseAndSpeeds(mrpt::math::TPose2D &curPose, mrpt::math::TTwist2D &curVel, mrpt::system::TTimeStamp ×tamp, mrpt::math::TPose2D &curOdometry, std::string &frame_id) MRPT_OVERRIDE
Get the current pose and velocity of the robot.
void sendVelCmd(const CVehicleVelCmd &cmd_vel) MRPT_OVERRIDE
Sends a velocity command to the robot.
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
mrpt::kinematics::CVehicleVelCmdPtr getStopCmd() MRPT_OVERRIDE
Gets the emergency stop command for the current robot.
const mrpt::math::TPose2D & getCurrentOdometricPose() const
Returns the current pose according to (noisy) odometry.
Kinematic model for Ackermann-like or differential-driven vehicles.
CRobot2NavInterfaceForSimulator_Holo(mrpt::kinematics::CVehicleSimul_Holo &simul)
bool changeSpeeds(const mrpt::kinematics::CVehicleVelCmd &vel_cmd) MRPT_OVERRIDE
Sends a velocity command to the robot.