Implements a reactive navigation system based on TP-Space, with an arbitrary holonomic reactive method running on it, and any desired number of PTG for transforming the navigation space.
Both, the holonomic method and the PTGs can be customized by the apropriate user derived classes.
How to use:
Definition at line 76 of file CReactiveNavigationSystem.h.
#include <mrpt/reactivenav/CReactiveNavigationSystem.h>

Classes | |
| struct | THolonomicMovement |
| The structure used for storing a movement generated by a holonomic-method . More... | |
Public Types | |
| enum | TState { IDLE =0, NAVIGATING, SUSPENDED, NAV_ERROR } |
| The different states for the navigation system. More... | |
Public Member Functions | |
| CReactiveNavigationSystem (CReactiveInterfaceImplementation &react_iterf_impl, bool enableConsoleOutput=true, bool enableLogFile=false) | |
| Constructor. | |
| virtual | ~CReactiveNavigationSystem () |
| Destructor. | |
| void | loadConfigFile (const mrpt::utils::CConfigFileBase &ini, const mrpt::utils::CConfigFileBase &robotIni) |
| Reload the configuration from a file. | |
| void | initialize () |
| Must be called for loading collision grids, or the first navigation command may last a long time to be executed. | |
| float | evaluate (TNavigationParams *params) |
| Evaluate navigation hardness: | |
| void | navigate (TNavigationParams *params) |
| Start navigation: | |
| void | setParams (TNavigationParams *params) |
| Change current navigation params: | |
| void | setHolonomicMethod (THolonomicMethod method, const char *config_INIfile="./CONFIG_ReactiveNavigator.ini") |
| Selects which one from the set of available holonomic methods will be used into transformed TP-Space, and sets its configuration from a configuration file. | |
| void | changeRobotShape (math::CPolygon &shape) |
| Change the robot shape, which is taken into account for collision grid building. | |
| void | getLastLogRecord (CLogFileRecord &o) |
| Provides a copy of the last log record with information about execution. | |
| void | enableLogFile (bool enable) |
| Enables / disables the logging into a file. | |
| 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 | 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 Attributes | |
| TState | m_navigationState |
| Current internal state of navigator: | |
| TNavigationParams | m_navigationParams |
| Current navigation parameters: | |
| CReactiveInterfaceImplementation & | m_robot |
| The navigator-robot interface. | |
Private Member Functions | |
| void | performNavigationStep () |
| The main method for the navigator. | |
| void | STEP1_CollisionGridsBuilder () |
| bool | STEP2_Sense (mrpt::slam::CSimplePointsMap &out_obstacles) |
| void | STEP3_SpaceTransformer (poses::CPointsMap &in_obstacles, CParameterizedTrajectoryGenerator *in_PTG, vector_double &out_TPObstacles) |
| void | STEP4_HolonomicMethod (vector_double &in_Obstacles, poses::CPoint2D &in_Target, float in_maxRobotSpeed, THolonomicMovement &out_selectedMovement, CHolonomicLogFileRecordPtr &in_HLFR) |
| void | STEP5_Evaluator (THolonomicMovement &in_holonomicMovement, vector_double &in_TPObstacles, poses::CPoint2D &WS_Target, poses::CPoint2D &TP_Target, bool wasSelectedInLast, CLogFileRecord::TInfoPerPTG &log) |
| void | STEP6_Selector (std::vector< THolonomicMovement > &in_holonomicMovements, THolonomicMovement &out_selectedHolonomicMovement, int &out_nSelectedPTG) |
| void | STEP7_NonHolonomicMovement (THolonomicMovement &in_movement, float &out_v, float &out_w) |
| void | doEmergencyStop (const char *msg) |
| Stops the robot and set navigation state to error. | |
|
inherited |
The different states for the navigation system.
| Enumerator | |
|---|---|
| IDLE | |
| NAVIGATING | |
| SUSPENDED | |
| NAV_ERROR | |
Definition at line 190 of file CAbstractReactiveNavigationSystem.h.
| mrpt::reactivenav::CReactiveNavigationSystem::CReactiveNavigationSystem | ( | CReactiveInterfaceImplementation & | react_iterf_impl, |
| bool | enableConsoleOutput = true, |
||
| bool | enableLogFile = false |
||
| ) |
Constructor.
| configINIFile | The file to load the configuration from. See loadConfigFile |
| robotConfigFile | The file to load the robot specific configuration from. |
| rmc | A set of wrappers that must be filled in. |
| sensors | A set of wrappers that must be filled in. |
| dbg | A set of wrappers that must be filled in. |
| evnts | A set of wrappers that must be filled in. |
| enableConsoleOutput | Set to false if console output is not desired. |
| enableLogFile | Set to true to enable logging to file. |
|
virtual |
Destructor.
|
inherited |
Cancel current navegacion.
| void mrpt::reactivenav::CReactiveNavigationSystem::changeRobotShape | ( | math::CPolygon & | shape | ) |
Change the robot shape, which is taken into account for collision grid building.
|
private |
Stops the robot and set navigation state to error.
| void mrpt::reactivenav::CReactiveNavigationSystem::enableLogFile | ( | bool | enable | ) |
Enables / disables the logging into a file.
|
virtual |
Evaluate navigation hardness:
Implements mrpt::reactivenav::CAbstractReactiveNavigationSystem.
|
inlineinherited |
Returns the current navigator state.
Definition at line 200 of file CAbstractReactiveNavigationSystem.h.
| void mrpt::reactivenav::CReactiveNavigationSystem::getLastLogRecord | ( | CLogFileRecord & | o | ) |
Provides a copy of the last log record with information about execution.
On any unexpected error "*o" will be NULL.
| o | An object where the log will be stored into. |
| void mrpt::reactivenav::CReactiveNavigationSystem::initialize | ( | ) |
Must be called for loading collision grids, or the first navigation command may last a long time to be executed.
| void mrpt::reactivenav::CReactiveNavigationSystem::loadConfigFile | ( | const mrpt::utils::CConfigFileBase & | ini, |
| const mrpt::utils::CConfigFileBase & | robotIni | ||
| ) |
Reload the configuration from a file.
|
virtual |
Start navigation:
Implements mrpt::reactivenav::CAbstractReactiveNavigationSystem.
|
inherited |
This method must be called periodically in order to effectively run the navigation.
|
privatevirtual |
The main method for the navigator.
Implements mrpt::reactivenav::CAbstractReactiveNavigationSystem.
|
staticinherited |
Sends a formated text to "debugOut" if not NULL, or to cout otherwise.
Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute().
|
inherited |
Continues with suspended navigation.
| void mrpt::reactivenav::CReactiveNavigationSystem::setHolonomicMethod | ( | THolonomicMethod | method, |
| const char * | config_INIfile = "./CONFIG_ReactiveNavigator.ini" |
||
| ) |
Selects which one from the set of available holonomic methods will be used into transformed TP-Space, and sets its configuration from a configuration file.
|
virtual |
Change current navigation params:
Implements mrpt::reactivenav::CAbstractReactiveNavigationSystem.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtualinherited |
Suspend current navegation.
|
private |
Definition at line 207 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 206 of file CReactiveNavigationSystem.h.
|
private |
For sending an alarm (error event) when it seems that we are not approaching toward the target in a while...
Definition at line 205 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 190 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 190 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 213 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 196 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 218 of file CReactiveNavigationSystem.h.
|
private |
The holonomic navigation algorithm.
Definition at line 178 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 221 of file CReactiveNavigationSystem.h.
|
private |
For the histeresis:
Definition at line 159 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 159 of file CReactiveNavigationSystem.h.
|
private |
The last log.
Definition at line 156 of file CReactiveNavigationSystem.h.
|
private |
The current log file stream, or NULL if not being used.
Definition at line 179 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 273 of file CReactiveNavigationSystem.h.
|
private |
Critical zones:
Definition at line 166 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 166 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 227 of file CReactiveNavigationSystem.h.
|
private |
Enables / disables the console debug output.
Definition at line 181 of file CReactiveNavigationSystem.h.
|
private |
Whether loadConfigFile() has been called or not.
Definition at line 183 of file CReactiveNavigationSystem.h.
|
protectedinherited |
Current navigation parameters:
Definition at line 218 of file CAbstractReactiveNavigationSystem.h.
|
protectedinherited |
Current internal state of navigator:
Definition at line 214 of file CAbstractReactiveNavigationSystem.h.
|
protectedinherited |
The navigator-robot interface.
Definition at line 221 of file CAbstractReactiveNavigationSystem.h.
|
private |
Definition at line 195 of file CReactiveNavigationSystem.h.
|
private |
Runtime estimation of execution period of the method.
Definition at line 200 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 224 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 225 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 195 of file CReactiveNavigationSystem.h.
|
private |
Will be false until the navigation end is sent, and it is reset with each new command.
Definition at line 163 of file CReactiveNavigationSystem.h.
|
private |
The iteration count.
Definition at line 199 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 226 of file CReactiveNavigationSystem.h.
|
private |
The set of transformations to be used:
Definition at line 232 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 189 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 191 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 192 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 193 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 193 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 188 of file CReactiveNavigationSystem.h.
|
private |
The robot 2D shape model.
Definition at line 212 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 218 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 185 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 222 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 222 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 218 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 219 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 220 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 223 of file CReactiveNavigationSystem.h.
|
private |
Definition at line 194 of file CReactiveNavigationSystem.h.
| Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013 |