#include <mrpt/reactivenav/CReactiveNavigationSystem.h>
Classes | |
class | CDynamicWindow |
For taken the dynamics of the robot into account. More... | |
struct | THolonomicMovement |
The structure used for storing a movement generated by a holonomic-method . More... | |
Public Types | |
enum | TNavigatorBehavior { beNormalNavigation = 0, beHeadDirection, beDoorCrosing1, beDoorCrosing2, beDoorCrosing3 } |
See 'navigatorBehavior'. More... | |
Public Member Functions | |
CReactiveNavigationSystem (TRobotMotionControl &rmc, TSensors &sensors, void(*emul_printf)(const char *s), TEventsLaunching &evnts, const mrpt::utils::CConfigFileBase &configIni, const mrpt::utils::CConfigFileBase &configRobotIni, 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. | |
Private Member Functions | |
void | performNavigationStep () |
The main method for the navigator. | |
void | enableLogFile (bool enable) |
Enables / disables the logging into a file. | |
void | STEP1_CollisionGridsBuilder () |
bool | STEP2_Sense (mrpt::slam::CSimplePointsMap &out_obstacles, mrpt::slam::COccupancyGridMap2D *out_obstaclesGridMap=NULL) |
void | STEP3_SpaceTransformer (poses::CPointsMap &in_obstacles, CParameterizedTrajectoryGenerator *in_PTG, vector_float &out_TPObstacles) |
void | STEP4_HolonomicMethod (vector_float &in_Obstacles, poses::CPoint2D &in_Target, float in_maxRobotSpeed, THolonomicMovement &out_selectedMovement, CHolonomicLogFileRecordPtr &in_HLFR) |
void | STEP5_Evaluator (THolonomicMovement &in_holonomicMovement, vector_float &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 | Error_ParadaDeEmergencia (const char *msg) |
Private Attributes | |
TNavigatorBehavior | navigatorBehavior |
This defines the 'behavior' of the navigator (see posible values in TNavigatorBehavior). | |
float | m_beHeadDirection_rad |
The desired heading direction (in rads), for behaviors 'beHeadDirection' and 'beDoorCrosing2'. | |
CPoint2D | m_beAuxTarget |
Auxiliary target position, for behaviors 'beDoorCrosing1' and 'beDoorCrosing3'. | |
CPoint2D | m_bePassPoint1 |
This is the desired "path" for passing a door (in GLOBAL coordinates!). | |
CPoint2D | m_bePassPoint2 |
CLogFileRecord | lastLogRecord |
The last log. | |
float | last_cmd_v |
For the histeresis:. | |
float | last_cmd_w |
bool | navigationEndEventSent |
Will be false until the navigation end is sent, and it is reset with each new command. | |
synch::CCriticalSection | critZoneLastLog |
Critical zones:. | |
synch::CCriticalSection | critZoneNavigating |
CAbstractHolonomicReactiveMethod * | holonomicMethod |
The current log file stream, or NULL if not being used. | |
utils::CStream * | logFile |
The current log file stream, or NULL if not being used. | |
bool | enableConsoleOutput |
Enables / disables the console debug output. | |
CTicTac | timerForExecutionPeriod |
bool | m_debugWindows |
Show debug windows with the internal state, etc... | |
std::string | robotName |
float | refDistance |
float | colGridRes_x |
float | colGridRes_y |
float | robotMax_V_mps |
float | robotMax_W_degps |
float | ROBOTMODEL_TAU |
float | ROBOTMODEL_DELAY |
vector_float | weights |
float | minObstaclesHeight |
float | maxObstaclesHeight |
float | DIST_TO_TARGET_FOR_SENDING_EVENT |
float | DOOR_CROSSING_SEARCH_TARGET_DISTANCEx2 |
float | VORONOI_MINIMUM_CLEARANCE |
float | DISABLE_PERIOD_AFTER_FAIL |
float | VORONOI_PATH_DIST_FROM_DOORWAY |
float | DOORCROSSING_HEADING_ACCURACY_DEG |
float | DOORCROSSING_ROTATION_CTE_DEG |
float | DOOR_CROSSING_DIST_TO_AUX_TARGETS |
float | DOOR_CROOSING_BEH3_TIMEOUT |
float | DOOR_CROSSING_MAXIMUM_DOORWAY_SIZE |
unsigned long | nIteration |
The iterations count. | |
float | meanExecutionPeriod |
Runtime estimation of execution period of the method. | |
float | badNavAlarm_minDistTarget |
For sending an alarm (error event) when it seems that we are not approaching toward the target in a while. | |
mrpt::system::TTimeStamp | badNavAlarm_lastMinDistTime |
float | badNavAlarm_AlarmTimeout |
math::CPolygon | robotShape |
The robot 2D shape model. | |
bool | collisionGridsMustBeUpdated |
std::vector < CParameterizedTrajectoryGenerator * > | PTGs |
The set of transformations to be used:. | |
mrpt::gui::CDisplayWindowPlotsPtr | m_debugWin_WS |
bool | CerrandoHilo |
Both, the holonomic method and the PTGs can be customized by the apropriate user derived classes. For running it, the method NavigateStep must be invoked periodically.
Definition at line 71 of file CReactiveNavigationSystem.h.
See 'navigatorBehavior'.
Definition at line 139 of file CReactiveNavigationSystem.h.
mrpt::reactivenav::CReactiveNavigationSystem::CReactiveNavigationSystem | ( | TRobotMotionControl & | rmc, | |
TSensors & | sensors, | |||
void(*)(const char *s) | emul_printf, | |||
TEventsLaunching & | evnts, | |||
const mrpt::utils::CConfigFileBase & | configIni, | |||
const mrpt::utils::CConfigFileBase & | configRobotIni, | |||
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 mrpt::reactivenav::CReactiveNavigationSystem::~CReactiveNavigationSystem | ( | ) | [virtual] |
Destructor.
void mrpt::reactivenav::CReactiveNavigationSystem::changeRobotShape | ( | math::CPolygon & | shape | ) |
Change the robot shape, which is taken into account for collision grid building.
void mrpt::reactivenav::CReactiveNavigationSystem::enableLogFile | ( | bool | enable | ) | [private] |
Enables / disables the logging into a file.
void mrpt::reactivenav::CReactiveNavigationSystem::Error_ParadaDeEmergencia | ( | const char * | msg | ) | [private] |
float mrpt::reactivenav::CReactiveNavigationSystem::evaluate | ( | TNavigationParams * | params | ) | [virtual] |
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.
void mrpt::reactivenav::CReactiveNavigationSystem::navigate | ( | TNavigationParams * | params | ) | [virtual] |
void mrpt::reactivenav::CReactiveNavigationSystem::performNavigationStep | ( | ) | [private, virtual] |
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.
void mrpt::reactivenav::CReactiveNavigationSystem::setParams | ( | TNavigationParams * | params | ) | [virtual] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP1_CollisionGridsBuilder | ( | ) | [private] |
bool mrpt::reactivenav::CReactiveNavigationSystem::STEP2_Sense | ( | mrpt::slam::CSimplePointsMap & | out_obstacles, | |
mrpt::slam::COccupancyGridMap2D * | out_obstaclesGridMap = NULL | |||
) | [private] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP3_SpaceTransformer | ( | poses::CPointsMap & | in_obstacles, | |
CParameterizedTrajectoryGenerator * | in_PTG, | |||
vector_float & | out_TPObstacles | |||
) | [private] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP4_HolonomicMethod | ( | vector_float & | in_Obstacles, | |
poses::CPoint2D & | in_Target, | |||
float | in_maxRobotSpeed, | |||
THolonomicMovement & | out_selectedMovement, | |||
CHolonomicLogFileRecordPtr & | in_HLFR | |||
) | [private] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP5_Evaluator | ( | THolonomicMovement & | in_holonomicMovement, | |
vector_float & | in_TPObstacles, | |||
poses::CPoint2D & | WS_Target, | |||
poses::CPoint2D & | TP_Target, | |||
bool | wasSelectedInLast, | |||
CLogFileRecord::TInfoPerPTG & | log | |||
) | [private] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP6_Selector | ( | std::vector< THolonomicMovement > & | in_holonomicMovements, | |
THolonomicMovement & | out_selectedHolonomicMovement, | |||
int & | out_nSelectedPTG | |||
) | [private] |
void mrpt::reactivenav::CReactiveNavigationSystem::STEP7_NonHolonomicMovement | ( | THolonomicMovement & | in_movement, | |
float & | out_v, | |||
float & | out_w | |||
) | [private] |
Definition at line 275 of file CReactiveNavigationSystem.h.
mrpt::system::TTimeStamp mrpt::reactivenav::CReactiveNavigationSystem::badNavAlarm_lastMinDistTime [private] |
Definition at line 274 of file CReactiveNavigationSystem.h.
For sending an alarm (error event) when it seems that we are not approaching toward the target in a while.
..
Definition at line 273 of file CReactiveNavigationSystem.h.
bool mrpt::reactivenav::CReactiveNavigationSystem::CerrandoHilo [private] |
Definition at line 330 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::colGridRes_x [private] |
Definition at line 244 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::colGridRes_y [private] |
Definition at line 244 of file CReactiveNavigationSystem.h.
Definition at line 281 of file CReactiveNavigationSystem.h.
Definition at line 212 of file CReactiveNavigationSystem.h.
Definition at line 254 of file CReactiveNavigationSystem.h.
Definition at line 250 of file CReactiveNavigationSystem.h.
Definition at line 259 of file CReactiveNavigationSystem.h.
Definition at line 258 of file CReactiveNavigationSystem.h.
Definition at line 260 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::DOOR_CROSSING_SEARCH_TARGET_DISTANCEx2 [private] |
Definition at line 252 of file CReactiveNavigationSystem.h.
Definition at line 256 of file CReactiveNavigationSystem.h.
Definition at line 257 of file CReactiveNavigationSystem.h.
Enables / disables the console debug output.
Definition at line 236 of file CReactiveNavigationSystem.h.
CAbstractHolonomicReactiveMethod* mrpt::reactivenav::CReactiveNavigationSystem::holonomicMethod [private] |
The current log file stream, or NULL if not being used.
Definition at line 230 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::last_cmd_v [private] |
float mrpt::reactivenav::CReactiveNavigationSystem::last_cmd_w [private] |
Definition at line 204 of file CReactiveNavigationSystem.h.
The current log file stream, or NULL if not being used.
Definition at line 233 of file CReactiveNavigationSystem.h.
Auxiliary target position, for behaviors 'beDoorCrosing1' and 'beDoorCrosing3'.
Definition at line 174 of file CReactiveNavigationSystem.h.
The desired heading direction (in rads), for behaviors 'beHeadDirection' and 'beDoorCrosing2'.
Definition at line 170 of file CReactiveNavigationSystem.h.
This is the desired "path" for passing a door (in GLOBAL coordinates!).
Definition at line 178 of file CReactiveNavigationSystem.h.
Definition at line 178 of file CReactiveNavigationSystem.h.
mrpt::gui::CDisplayWindowPlotsPtr mrpt::reactivenav::CReactiveNavigationSystem::m_debugWin_WS [private] |
Definition at line 288 of file CReactiveNavigationSystem.h.
bool mrpt::reactivenav::CReactiveNavigationSystem::m_debugWindows [private] |
Show debug windows with the internal state, etc...
Definition at line 241 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::maxObstaclesHeight [private] |
Definition at line 249 of file CReactiveNavigationSystem.h.
Runtime estimation of execution period of the method.
Definition at line 268 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::minObstaclesHeight [private] |
Definition at line 249 of file CReactiveNavigationSystem.h.
Will be false until the navigation end is sent, and it is reset with each new command.
Definition at line 208 of file CReactiveNavigationSystem.h.
This defines the 'behavior' of the navigator (see posible values in TNavigatorBehavior).
Definition at line 166 of file CReactiveNavigationSystem.h.
unsigned long mrpt::reactivenav::CReactiveNavigationSystem::nIteration [private] |
std::vector<CParameterizedTrajectoryGenerator*> mrpt::reactivenav::CReactiveNavigationSystem::PTGs [private] |
float mrpt::reactivenav::CReactiveNavigationSystem::refDistance [private] |
Definition at line 243 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::robotMax_V_mps [private] |
Definition at line 245 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::robotMax_W_degps [private] |
Definition at line 246 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::ROBOTMODEL_DELAY [private] |
Definition at line 247 of file CReactiveNavigationSystem.h.
float mrpt::reactivenav::CReactiveNavigationSystem::ROBOTMODEL_TAU [private] |
Definition at line 247 of file CReactiveNavigationSystem.h.
std::string mrpt::reactivenav::CReactiveNavigationSystem::robotName [private] |
Definition at line 242 of file CReactiveNavigationSystem.h.
Definition at line 238 of file CReactiveNavigationSystem.h.
Definition at line 253 of file CReactiveNavigationSystem.h.
Definition at line 255 of file CReactiveNavigationSystem.h.
Definition at line 248 of file CReactiveNavigationSystem.h.
Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:21:34 EDT 2009 |