MRPT  2.0.1
CRobot2NavInterface.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
12 #include "nav-precomp.h" // Precomp header
13 
14 using namespace mrpt::nav;
15 
17  : mrpt::system::COutputLogger("CRobot2NavInterface")
18 {
19 }
22 {
24  10.0,
25  "[changeSpeedsNOP] Doing nothing : not implemented in user's derived "
26  "class.");
27  return true;
28 }
29 
31  const double relative_heading_radians)
32 {
34 }
35 
36 /** \callergraph */
38 {
40  "[startWatchdog] Period=%.03f ms. Doing nothing: not implemented in "
41  "user's derived class.",
42  T_ms);
43  return true;
44 }
45 
46 /** \callergraph */
48 {
50  "[stopWatchdog] Doing nothing: not implemented in user's derived "
51  "class.");
52  return true;
53 }
54 
55 /** \callergraph */
57 {
59  "[sendNavigationStartEvent] Doing nothing: not implemented in user's "
60  "derived class.");
61 }
62 /** \callergraph */
64 {
66  "[sendNavigationEndEvent] Doing nothing: not implemented in user's "
67  "derived class.");
68 }
69 /** \callergraph */
71  int waypoint_index, bool reached_nSkipped)
72 {
74  "[sendWaypointReachedEvent] Marking waypoint #"
75  << waypoint_index << " as done. Reason: "
76  << (reached_nSkipped ? "Physically reached" : "Skipped"));
77 }
78 /** \callergraph */
80 {
82  "[sendNewWaypointTargetEvent] Navigating towards waypoint #"
83  << waypoint_index);
84 }
85 /** \callergraph */
87 {
89  1.0,
90  "[sendNavigationEndDueToErrorEvent] Doing nothing: not implemented in "
91  "user's derived class.");
92 }
93 /** \callergraph */
95 {
97  1.0,
98  "[sendWaySeemsBlockedEvent] Doing nothing: not implemented in user's "
99  "derived class.");
100 }
101 /** \callergraph */
103 {
105  1.0,
106  "[sendApparentCollisionEvent] Doing nothing: not implemented in user's "
107  "derived class.");
108 }
109 /** \callergraph */
111 {
113  1.0,
114  "[sendCannotGetCloserToBlockedTargetEvent] Doing nothing: not "
115  "implemented in user's derived class.");
116 }
117 
118 /** \callergraph */
120 /** \callergraph */
double Tac() noexcept
Stops the stopwatch.
Definition: CTicTac.cpp:86
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.
mrpt::system::CTicTac m_navtime
For getNavigationTime.
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) ...
mrpt::system::COutputLogger COutputLogger
virtual double getNavigationTime()
Returns the number of seconds ellapsed since the constructor of this class was invoked, or since the last call of resetNavigationTimer().
virtual mrpt::kinematics::CVehicleVelCmd::Ptr 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 sendCannotGetCloserToBlockedTargetEvent()
Callback: Target seems to be blocked by an obstacle.
#define MRPT_LOG_THROTTLE_INFO(_PERIOD_SECONDS, _STRING)
virtual void sendNavigationStartEvent()
Callback: Start of navigation command.
virtual void sendNavigationEndDueToErrorEvent()
Callback: Error asking sensory data from robot or sending motor commands.
virtual void sendApparentCollisionEvent()
Callback: Apparent collision event (i.e.
virtual void sendWaySeemsBlockedEvent()
Callback: No progression made towards target for a predefined period of time.
virtual void sendWaypointReachedEvent(int waypoint_index, bool reached_nSkipped)
Callback: Reached an intermediary waypoint in waypoint list navigation.
#define MRPT_LOG_INFO_STREAM(__CONTENTS)
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...
void Tic() noexcept
Starts the stopwatch.
Definition: CTicTac.cpp:75
std::shared_ptr< CVehicleVelCmd > Ptr
#define MRPT_LOG_INFO_FMT(_FMT_STRING,...)
#define MRPT_LOG_INFO(_STRING)



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020