Main MRPT website > C++ reference for MRPT 1.5.7
CRobot2NavInterface.cpp
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 
10 #include "nav-precomp.h" // Precomp header
13 
14 using namespace mrpt::nav;
15 
17  mrpt::utils::COutputLogger("CRobot2NavInterface")
18 {
19 }
21 {
22 }
24 {
25  MRPT_LOG_THROTTLE_INFO(10.0, "[changeSpeedsNOP] Doing nothing : not implemented in user's derived class.");
26  return true;
27 }
28 
29 mrpt::kinematics::CVehicleVelCmdPtr CRobot2NavInterface::getAlignCmd(const double relative_heading_radians)
30 {
31  return mrpt::kinematics::CVehicleVelCmdPtr();
32 }
33 
35 {
36  MRPT_LOG_INFO_FMT("[startWatchdog] Period=%.03f ms. Doing nothing: not implemented in user's derived class.", T_ms);
37  return true;
38 }
39 
41 {
42  MRPT_LOG_INFO("[stopWatchdog] Doing nothing: not implemented in user's derived class.");
43  return true;
44 }
45 
47 {
48  MRPT_LOG_INFO("[sendNavigationStartEvent] Doing nothing: not implemented in user's derived class.");
49 }
51 {
52  MRPT_LOG_INFO("[sendNavigationEndEvent] Doing nothing: not implemented in user's derived class.");
53 }
54 void CRobot2NavInterface::sendWaypointReachedEvent(int waypoint_index, bool reached_nSkipped)
55 {
56  MRPT_LOG_INFO_STREAM("[sendWaypointReachedEvent] Marking waypoint #" << waypoint_index << " as done. Reason: " << (reached_nSkipped ? "Physically reached" : "Skipped") );
57 }
59 {
60  MRPT_LOG_INFO_STREAM("[sendNewWaypointTargetEvent] Navigating towards waypoint #" << waypoint_index);
61 }
63 {
64  MRPT_LOG_THROTTLE_INFO(1.0,"[sendNavigationEndDueToErrorEvent] Doing nothing: not implemented in user's derived class.");
65 }
67 {
68  MRPT_LOG_THROTTLE_INFO(1.0, "[sendWaySeemsBlockedEvent] Doing nothing: not implemented in user's derived class.");
69 }
71 {
72  MRPT_LOG_THROTTLE_INFO(1.0,"[sendApparentCollisionEvent] Doing nothing: not implemented in user's derived class.");
73 }
75 {
76  MRPT_LOG_THROTTLE_INFO(1.0, "[sendCannotGetCloserToBlockedTargetEvent] Doing nothing: not implemented in user's derived class.");
77 }
78 
80  return m_navtime.Tac();
81 }
83  m_navtime.Tic();
84 }
virtual bool startWatchdog(float T_ms)
Start the watchdog timer of the robot platform, if any, for maximum expected delay between consecutiv...
virtual void sendNewWaypointTargetEvent(int waypoint_index)
Callback: Heading towards a new intermediary/final waypoint in waypoint list navigation.
virtual bool stopWatchdog()
Stop the watchdog timer.
virtual void resetNavigationTimer()
see getNavigationTime()
virtual void sendNavigationEndEvent()
Callback: End of navigation command (reach of single goal, or final waypoint of waypoint list) ...
virtual double getNavigationTime()
Returns the number of seconds ellapsed since the constructor of this class was invoked, or since the last call of resetNavigationTimer().
#define MRPT_LOG_THROTTLE_INFO(_PERIOD_SECONDS, _STRING)
void Tic()
Starts the stopwatch.
Definition: CTicTac.cpp:77
virtual void sendCannotGetCloserToBlockedTargetEvent(bool &do_abort_nav)
Callback: Target seems to be blocked by an obstacle.
virtual mrpt::kinematics::CVehicleVelCmdPtr getAlignCmd(const double relative_heading_radians)
Gets a motion command to make the robot to align with a given relative heading, without translating...
virtual void sendNavigationStartEvent()
Callback: Start of navigation command.
virtual void sendNavigationEndDueToErrorEvent()
Callback: Error asking sensory data from robot or sending motor commands.
#define MRPT_LOG_INFO(_STRING)
virtual void sendApparentCollisionEvent()
Callback: Apparent collision event (i.e.
virtual void sendWaySeemsBlockedEvent()
Callback: No progression made towards target for a predefined period of time.
mrpt::utils::CTicTac m_navtime
For getNavigationTime.
virtual void sendWaypointReachedEvent(int waypoint_index, bool reached_nSkipped)
Callback: Reached an intermediary waypoint in waypoint list navigation.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
virtual bool changeSpeedsNOP()
Just like changeSpeeds(), but will be called when the last velocity command is still the preferred so...
#define MRPT_LOG_INFO_STREAM(__CONTENTS)
#define MRPT_LOG_INFO_FMT(_FMT_STRING,...)
double Tac()
Stops the stopwatch.
Definition: CTicTac.cpp:92



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019