This is the base class for any reactive navigation system.
Here is defined the interface that users will use with derived classes where algorithms are really implemented.
Changes history:
16/SEP/2004: Totally redesigned.
How to use:
Definition at line 102 of file CAbstractReactiveNavigationSystem.h.
#include <mrpt/nav/reactive/CAbstractReactiveNavigationSystem.h>
Classes | |
struct | TNavigationParams |
The struct for configuring navigation requests. More... | |
Public Types | |
enum | TState { IDLE =0 , NAVIGATING , SUSPENDED , NAV_ERROR } |
The different states for the navigation system. More... | |
Public Member Functions | |
CAbstractReactiveNavigationSystem (CReactiveInterfaceImplementation &react_iterf_impl) | |
Constructor. | |
virtual | ~CAbstractReactiveNavigationSystem () |
Destructor. | |
void | cancel () |
Cancel current navegacion. | |
void | resume () |
Continues with suspended navigation. | |
void | navigationStep () |
This method must be called periodically in order to effectively run the navigation. | |
virtual void | navigate (const TNavigationParams *params)=0 |
Navigation request. | |
virtual void | suspend () |
Suspend current navegation. | |
TState | getCurrentState () const |
Returns the current navigator state. | |
Static Public Member Functions | |
static void | printf_debug (const char *frmt,...) |
Sends a formated text to "debugOut" if not NULL, or to cout otherwise. | |
Protected Member Functions | |
virtual void | performNavigationStep ()=0 |
To be implemented in derived classes. | |
Protected Attributes | |
TState | m_navigationState |
Current internal state of navigator: | |
TNavigationParams * | m_navigationParams |
Current navigation parameters. | |
CReactiveInterfaceImplementation & | m_robot |
The navigator-robot interface. | |
Private Attributes | |
TState | m_lastNavigationState |
Last internal state of navigator: | |
The different states for the navigation system.
Enumerator | |
---|---|
IDLE | |
NAVIGATING | |
SUSPENDED | |
NAV_ERROR |
Definition at line 145 of file CAbstractReactiveNavigationSystem.h.
mrpt::nav::CAbstractReactiveNavigationSystem::CAbstractReactiveNavigationSystem | ( | CReactiveInterfaceImplementation & | react_iterf_impl | ) |
Constructor.
|
virtual |
Destructor.
void mrpt::nav::CAbstractReactiveNavigationSystem::cancel | ( | ) |
Cancel current navegacion.
|
inline |
Returns the current navigator state.
Definition at line 154 of file CAbstractReactiveNavigationSystem.h.
|
pure virtual |
Navigation request.
It starts a new navigation.
[in] | params | Pointer to structure with navigation info (its contents will be copied, so the original can be freely destroyed upon return.) |
Implemented in mrpt::nav::CAbstractPTGBasedReactive.
void mrpt::nav::CAbstractReactiveNavigationSystem::navigationStep | ( | ) |
This method must be called periodically in order to effectively run the navigation.
|
protectedpure virtual |
To be implemented in derived classes.
Implemented in mrpt::nav::CAbstractPTGBasedReactive.
|
staticinherited |
Sends a formated text to "debugOut" if not NULL, or to cout otherwise.
Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute().
void mrpt::nav::CAbstractReactiveNavigationSystem::resume | ( | ) |
Continues with suspended navigation.
|
virtual |
Suspend current navegation.
|
private |
Last internal state of navigator:
Definition at line 157 of file CAbstractReactiveNavigationSystem.h.
|
protected |
Current navigation parameters.
Definition at line 164 of file CAbstractReactiveNavigationSystem.h.
|
protected |
Current internal state of navigator:
Definition at line 163 of file CAbstractReactiveNavigationSystem.h.
|
protected |
The navigator-robot interface.
Definition at line 167 of file CAbstractReactiveNavigationSystem.h.
Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 20:12:58 UTC 2023 |