See base class CAbstractPTGBasedReactive for a description and instructions of use.
This particular implementation assumes a 2D robot shape which can be polygonal or circular (depending on the selected PTGs).
Publications:
Class history:
This class requires a number of parameters which are usually provided via an external config (".ini") file. Alternatively, a memory-only object can be used to avoid physical files, see mrpt::config::CConfigFileMemory.
A template config file can be generated at any moment by the user by calling saveConfigFile() with a default-constructed object.
Next we provide a self-documented template config file; or see it online: https://github.com/MRPT/mrpt/blob/master/share/mrpt/config_files/navigation-ptgs/reactive2d_config.ini
# ------------------------------------------------------------------------ # Example configuration file for MRPT (>=1.5) Reactive Navigation engine. # See C++ documentation: http://reference.mrpt.org/devel/classmrpt_1_1nav_1_1_c_reactive_navigation_system.html # See ROS node documentation: http://wiki.ros.org/mrpt_reactivenav2d # ------------------------------------------------------------------------ # Max linear vel (m/s): @define ROBOT_MAX_V 1.0 # Max angular vel (deg/s): @define ROBOT_MAX_W 60.0 # Max distance to "foresee" obstacles (m): @define NAV_MAX_REF_DIST 10.0 [CAbstractNavigator] dist_to_target_for_sending_event = 0.000000 // Default value=0, means use the `targetAllowedDistance` passed by the user in the navigation request. alarm_seems_not_approaching_target_timeout = 30.000000 // navigator timeout (seconds) [Default=30 sec] dist_check_target_is_blocked = 2.0 // When closer than this distance, check if the target is blocked to abort navigation with an error hysteresis_check_target_is_blocked = 3 // How many steps should the condition for dist_check_target_is_blocked be fulfilled to raise an event [CWaypointsNavigator] max_distance_to_allow_skip_waypoint = -1.000000 // Max distance to `foresee` waypoints [meters]. (<0: unlimited) min_timesteps_confirm_skip_waypoints = 1 // Min timesteps a `future` waypoint must be seen as reachable to become the active one. waypoint_angle_tolerance = 5.0 // Angular error tolerance for waypoints with an assigned heading [deg] multitarget_look_ahead = 0 // >=0 number of waypoints to forward to the underlying navigation engine, to ease obstacles avoidance when a waypoint is blocked (Default=0 : none). [CAbstractPTGBasedReactive] robotMax_V_mps = ${ROBOT_MAX_V} // Max. linear speed (m/s) [Default=-1 (not set), will raise exception if needed and not set] robotMax_W_degps = ${ROBOT_MAX_W} // Max. angular speed (rad/s) [Default=-1 (not set), will raise exception if needed and not set] #robotMinCurvRadius = -1.000000 // Min. radius of curvature of paths (m) [Default=-1 (not set), will raise exception if needed and not set] holonomic_method = CHolonomicFullEval // C++ class name of the holonomic navigation method to run in the transformed TP-Space. # List of known classes: # - `CHolonomicFullEval` # - `CHolonomicND` # - `CHolonomicVFF` motion_decider_method = CMultiObjMotionOpt_Scalarization // C++ class name of the motion decider method. # List of known classes: # - `CMultiObjMotionOpt_Scalarization` ref_distance = ${NAV_MAX_REF_DIST} // Maximum distance up to obstacles will be considered (D_{max} in papers). #speedfilter_tau = 0.000000 // Time constant (in seconds) for the low-pass filter applied to kinematic velocity commands (default=0: no filtering) secure_distance_start = 0.050000 // In normalized distance [0,1], start/end of a ramp function that scales the holonomic navigator output velocity. secure_distance_end = 0.150000 // In normalized distance [0,1], start/end of a ramp function that scales the holonomic navigator output velocity. use_delays_model = false // Whether to use robot pose inter/extrapolation to improve accuracy (Default:false) max_distance_predicted_actual_path = 0.150000 // Max distance [meters] to discard current PTG and issue a new vel cmd (default= 0.05) min_normalized_free_space_for_ptg_continuation = 0.200000 // Min normalized dist [0,1] after current pose in a PTG continuation to allow it. enable_obstacle_filtering = true // Enabled obstacle filtering (params in its own section) evaluate_clearance = true [CPointCloudFilterByDistance] min_dist = 0.100000 angle_tolerance = 5.000000 too_old_seconds = 1.000000 previous_keyframes = 1 // (Default: 1) How many previous keyframes will be compared with the latest pointcloud. max_deletion_ratio = 0.400000 // (Default: 0.4) If the ratio [0,1] of points considered invalid (`deletion` ) is larger than this ratio, no point will be deleted since it'd be too suspicious and may indicate a failure of this filter. [CHolonomicFullEval] # [0]=Free space # [1]=Dist. in sectors # [2]=Closer to target (Euclidean) # [3]=Hysteresis # [4]=clearance along path factorWeights = [0.25 , 0.1 , 1 , 0.05 , 0.5 ] factorNormalizeOrNot = [0 , 0 , 0 , 0 , 1 ] TOO_CLOSE_OBSTACLE = 0.150000 // Directions with collision-free distances below this threshold are not elegible. TARGET_SLOW_APPROACHING_DISTANCE = 0.100000 // Start to reduce speed when closer than this to target. OBSTACLE_SLOW_DOWN_DISTANCE = 0.150000 // Start to reduce speed when clearance is below this value ([0,1] ratio wrt obstacle reference/max distance) HYSTERESIS_SECTOR_COUNT = 5.000000 // Range of `sectors` (directions) for hysteresis over successive timesteps LOG_SCORE_MATRIX = false // Save the entire score matrix in log files clearance_threshold_ratio = 0.10 // Ratio [0,1], times path_count, gives the minimum number of paths at each side of a target direction to be accepted as desired direction gap_width_ratio_threshold = 0.20 // Ratio [0,1], times path_count, gives the minimum gap width to accept a direct motion towards target. PHASE_COUNT = 3 // Number of evaluation phases to run (params for each phase below) PHASE1_FACTORS = [1 2] // Indices of the factors above to be considered in this phase PHASE1_THRESHOLD = 0.5 // Phase scores must be above this relative range threshold [0,1] to be considered in next phase (Default:`0.75`) PHASE2_FACTORS = [4 0] // Indices of the factors above to be considered in this phase PHASE2_THRESHOLD = 0.6 // Phase scores must be above this relative range threshold [0,1] to be considered in next phase (Default:`0.75`) PHASE3_FACTORS = [0 2] // Indices of the factors above to be considered in this phase PHASE3_THRESHOLD = 0.7 // Phase scores must be above this relative range threshold [0,1] to be considered in next phase (Default:`0.75`) [CHolonomicND] WIDE_GAP_SIZE_PERCENT = 0.250000 MAX_SECTOR_DIST_FOR_D2_PERCENT = 0.250000 RISK_EVALUATION_SECTORS_PERCENT = 0.100000 RISK_EVALUATION_DISTANCE = 0.400000 // In normalized ps-meters [0,1] TOO_CLOSE_OBSTACLE = 0.150000 // For stopping gradually TARGET_SLOW_APPROACHING_DISTANCE = 0.600000 // In normalized ps-meters factorWeights = 1.00 0.50 2.00 0.40 // [0]=Free space, [1]=Dist. in sectors, [2]=Closer to target (Euclidean), [3]=Hysteresis [CHolonomicVFF] TARGET_SLOW_APPROACHING_DISTANCE = 0.100000 // For stopping gradually TARGET_ATTRACTIVE_FORCE = 20.000000 // Dimension-less (may have to be tuned depending on the density of obstacle sampling) [CMultiObjectiveMotionOptimizerBase] # Next follows a list of `score%i_{name,formula}` pairs for i=1,...,N # Each one defines an exprtk formula for one of the scores that will be evaluated for each candidate movement. # Multiobjective optimizers will then use those scores to select the best candidate, # possibly using more parameters that follow below. # See list of all available variables in documentation of mrpt::nav::CAbstractPTGBasedReactive at http://reference.mrpt.org/devel/classmrpt_1_1nav_1_1_c_abstract_p_t_g_based_reactive.html score1_name = target_distance score1_formula = \ var effective_trg_d_norm := max(0,target_d_norm-move_cur_d); \ if(collision_free_distance>effective_trg_d_norm, \ 1/(1+effective_trg_d_norm^2), \ 0) score2_name = collision_free_distance_score score2_formula = \ var effective_trg_d_norm := max(0,target_d_norm-move_cur_d); \ if (collision_free_distance>(effective_trg_d_norm+0.05), \ 1.0, \ collision_free_distance) score3_name = euclidean_nearness score3_formula = 1/(1+dist_eucl_min^2) score4_name = hysteresis_score score4_formula = hysteresis score5_name = path_index_near_target score5_formula = \ var dif:=abs(target_k-move_k); \ if (dif>(num_paths/2)) \ { \ dif:=num_paths-dif; \ }; \ exp(-abs(dif / (num_paths/10.0))); score6_name = ptg_priority_score score6_formula = ptg_priority # Next follows a list of `movement_assert%i` exprtk expressions for i=1,...,N # defining expressions for conditions that any candidate movement must fulfill # in order to get through the evaluation process. *All* assert conditions must be satisfied. #movement_assert1 = XXX # Comma-separated list of scores to normalize so the highest is 1.0. scores_to_normalize = #target_distance [CMultiObjMotionOpt_Scalarization] # A formula that takes all/a subset of scores and generates a scalar global score. scalar_score_formula = ptg_priority_score*( \ 0.3*target_distance + \ 0.5*collision_free_distance_score + \ 8.0*euclidean_nearness + \ 0.1 * hysteresis_score + \ 0.2*path_index_near_target \ ) [CReactiveNavigationSystem] min_obstacles_height = 0.000000 // Minimum `z` coordinate of obstacles to be considered fo collision checking max_obstacles_height = 10.000000 // Maximum `z` coordinate of obstacles to be considered fo collision checking # PTGs: See classes derived from mrpt::nav::CParameterizedTrajectoryGenerator ( http://reference.mrpt.org/svn/classmrpt_1_1nav_1_1_c_parameterized_trajectory_generator.html) # refer to papers for details. #------------------------------------------------------------------------------ PTG_COUNT = 3 PTG0_Type = CPTG_DiffDrive_C PTG0_resolution = 0.05 # Look-up-table cell size or resolution (in meters) PTG0_refDistance= ${NAV_MAX_REF_DIST} # Maximum distance to build PTGs (in meters), i.e. the visibility "range" of tentative paths PTG0_num_paths= 121 PTG0_v_max_mps = ${ROBOT_MAX_V} PTG0_w_max_dps = ${ROBOT_MAX_W} PTG0_K = 1.0 PTG0_score_priority = 1.0 PTG1_Type = CPTG_DiffDrive_alpha PTG1_resolution = 0.05 # Look-up-table cell size or resolution (in meters) PTG1_refDistance= ${NAV_MAX_REF_DIST} # Maximum distance to build PTGs (in meters), i.e. the visibility "range" of tentative paths PTG1_num_paths = 121 PTG1_v_max_mps = ${ROBOT_MAX_V} PTG1_w_max_dps = ${ROBOT_MAX_W} PTG1_cte_a0v_deg = 57 PTG1_cte_a0w_deg = 57 PTG1_score_priority = 1.0 PTG2_Type = CPTG_DiffDrive_C PTG2_resolution = 0.05 # Look-up-table cell size or resolution (in meters) PTG2_refDistance= ${NAV_MAX_REF_DIST} # Maximum distance to build PTGs (in meters), i.e. the visibility "range" of tentative paths PTG2_num_paths = 121 PTG2_v_max_mps = ${ROBOT_MAX_V} PTG2_w_max_dps = ${ROBOT_MAX_W} PTG2_K = -1.0 PTG2_score_priority = 0.5 # Default 2D robot shape for collision checks: (ignored in ROS, superseded by node parameters) # Each PTG will use only one of either (a) polygonal 2D shape or, (b) radius of a circular shape RobotModel_shape2D_xs=-0.2 0.1 0.1 -0.2 RobotModel_shape2D_ys=0.1 0.1 -0.1 -0.1 RobotModel_circular_shape_radius = 0.5
Definition at line 62 of file CReactiveNavigationSystem.h.
#include <mrpt/nav/reactive/CReactiveNavigationSystem.h>
Classes | |
struct | TReactiveNavigatorParams |
Public Member Functions | |
CReactiveNavigationSystem (CRobot2NavInterface &react_iterf_impl, bool enableConsoleOutput=true, bool enableLogFile=false, const std::string &logFileDirectory=std::string("./reactivenav.logs")) | |
See docs in ctor of base class. More... | |
virtual | ~CReactiveNavigationSystem () |
Destructor. More... | |
void | changeRobotShape (const mrpt::math::CPolygon &shape) |
Defines the 2D polygonal robot shape, used for some PTGs for collision checking. More... | |
void | changeRobotCircularShapeRadius (const double R) |
Defines the 2D circular robot shape radius, used for some PTGs for collision checking. More... | |
virtual size_t | getPTG_count () const override |
Returns the number of different PTGs that have been setup. More... | |
virtual CParameterizedTrajectoryGenerator * | getPTG (size_t i) override |
Gets the i'th PTG. More... | |
virtual const CParameterizedTrajectoryGenerator * | getPTG (size_t i) const override |
Gets the i'th PTG. More... | |
virtual bool | checkCollisionWithLatestObstacles (const mrpt::math::TPose2D &relative_robot_pose) const override |
Checks whether the robot shape, when placed at the given pose (relative to the current pose), is colliding with any of the latest known obstacles. More... | |
virtual void | loadConfigFile (const mrpt::config::CConfigFileBase &c) override |
Loads all params from a file. More... | |
virtual void | saveConfigFile (mrpt::config::CConfigFileBase &c) const override |
Saves all current options to a config file. More... | |
void | initialize () override |
Must be called for loading collision grids, or the first navigation command may last a long time to be executed. More... | |
void | setHolonomicMethod (const std::string &method, const mrpt::config::CConfigFileBase &cfgBase) |
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. More... | |
void | getLastLogRecord (CLogFileRecord &o) |
Provides a copy of the last log record with information about execution. More... | |
void | enableKeepLogRecords (bool enable=true) |
Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord() More... | |
void | enableLogFile (bool enable) |
Enables/disables saving log files. More... | |
void | setLogFileDirectory (const std::string &sDir) |
Changes the prefix for new log files. More... | |
std::string | getLogFileDirectory () const |
void | enableTimeLog (bool enable=true) |
Enables/disables the detailed time logger (default:disabled upon construction) When enabled, a report will be dumped to std::cout upon destruction. More... | |
const mrpt::system::CTimeLogger & | getTimeLogger () const |
Gives access to a const-ref to the internal time logger. More... | |
const mrpt::kinematics::CVehicleVelCmd::TVelCmdParams & | getCurrentRobotSpeedLimits () const |
Get the current, global (honored for all PTGs) robot speed limits. More... | |
mrpt::kinematics::CVehicleVelCmd::TVelCmdParams & | changeCurrentRobotSpeedLimits () |
Changes the current, global (honored for all PTGs) robot speed limits, via returning a reference to a structure that holds those limits. More... | |
void | setTargetApproachSlowDownDistance (const double dist) |
Changes this parameter in all inner holonomic navigator instances [m]. More... | |
double | getTargetApproachSlowDownDistance () const |
Returns this parameter for the first inner holonomic navigator instances [m] (should be the same in all of them?) More... | |
virtual void | navigationStep () override |
This method must be called periodically in order to effectively run the navigation. More... | |
virtual void | cancel () override |
Cancel current navegation. More... | |
bool | isRelativePointReachable (const mrpt::math::TPoint2D &wp_local_wrt_robot) const |
Returns true if, according to the information gathered at the last navigation step, there is a free path to the given point; false otherwise: if way is blocked or there is missing information, the point is out of range for the existing PTGs, etc. More... | |
const mrpt::system::CTimeLogger & | getDelaysTimeLogger () const |
Gives access to a const-ref to the internal time logger used to estimate delays. More... | |
Static Public Attributes | |
static mrpt::system::TConsoleColor | logging_levels_to_colors [NUMBER_OF_VERBOSITY_LEVELS] |
Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor. More... | |
static std::string | logging_levels_to_names [NUMBER_OF_VERBOSITY_LEVELS] |
Map from VerbosityLevels to their corresponding names. More... | |
Protected Member Functions | |
virtual void | loggingGetWSObstaclesAndShape (CLogFileRecord &out_log) override |
Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the current timestep. More... | |
void | STEP3_WSpaceToTPSpace (const size_t ptg_idx, std::vector< double > &out_TPObstacles, mrpt::nav::ClearanceDiagram &out_clearance, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, const bool eval_clearance) override |
Builds TP-Obstacles from Workspace obstacles for the given PTG. More... | |
virtual void | performNavigationStep () override |
The main method for the navigator. More... | |
virtual bool | impl_waypoint_is_reachable (const mrpt::math::TPoint2D &wp_local_wrt_robot) const override |
Implements the way to waypoint is free function in children classes: true must be returned if, according to the information gathered at the last navigation step, there is a free path to the given point; false otherwise: if way is blocked or there is missing information, the point is out of range, etc. More... | |
bool | STEP2_SenseObstacles () |
void | calc_move_candidate_scores (TCandidateMovementPTG &holonomicMovement, const std::vector< double > &in_TPObstacles, const mrpt::nav::ClearanceDiagram &in_clearance, const std::vector< mrpt::math::TPose2D > &WS_Targets, const std::vector< PTGTarget > &TP_Targets, CLogFileRecord::TInfoPerPTG &log, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, const mrpt::math::TPose2D &relPoseVelCmd_NOP, const unsigned int ptg_idx4weights, const mrpt::system::TTimeStamp tim_start_iteration, const mrpt::nav::CHolonomicLogFileRecord::Ptr &hlfr) |
Scores holonomicMovement. More... | |
virtual double | generate_vel_cmd (const TCandidateMovementPTG &in_movement, mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd) |
Return the [0,1] velocity scale of raw PTG cmd_vel. More... | |
void | STEP8_GenerateLogRecord (CLogFileRecord &newLogRec, const std::vector< mrpt::math::TPose2D > &relTargets, int nSelectedPTG, const mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd, int nPTGs, const bool best_is_NOP_cmdvel, const math::TPose2D &rel_cur_pose_wrt_last_vel_cmd_NOP, const math::TPose2D &rel_pose_PTG_origin_wrt_sense_NOP, const double executionTimeValue, const double tim_changeSpeed, const mrpt::system::TTimeStamp &tim_start_iteration) |
void | preDestructor () |
To be called during children destructors to assure thread-safe destruction, and free of shared objects. More... | |
virtual void | onStartNewNavigation () override |
Called whenever a new navigation has been started. More... | |
void | build_movement_candidate (CParameterizedTrajectoryGenerator *ptg, const size_t indexPTG, const std::vector< mrpt::math::TPose2D > &relTargets, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, TInfoPerPTG &ipf, TCandidateMovementPTG &holonomicMovement, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, mrpt::nav::CAbstractHolonomicReactiveMethod &holoMethod, const mrpt::system::TTimeStamp tim_start_iteration, const TNavigationParams &navp=TNavigationParams(), const mrpt::math::TPose2D &relPoseVelCmd_NOP=mrpt::math::TPose2D(0, 0, 0)) |
virtual void | onNavigateCommandReceived () override |
Called after each call to CAbstractNavigator::navigate() More... | |
virtual bool | checkHasReachedTarget (const double targetDist) const override |
Default implementation: check if target_dist is below the accepted distance. More... | |
virtual void | waypoints_navigationStep () |
The waypoints-specific part of navigationStep() More... | |
bool | waypoints_isAligning () const |
void | dispatchPendingNavEvents () |
void | updateCurrentPoseAndSpeeds () |
Call to the robot getCurrentPoseAndSpeeds() and updates members m_curPoseVel accordingly. More... | |
virtual void | performNavigationStepNavigating (bool call_virtual_nav_method=true) |
Factorization of the part inside navigationStep(), for the case of state being NAVIGATING. More... | |
void | processNavigateCommand (const TNavigationParams *params) |
Does the job of navigate(), except the call to onNavigateCommandReceived() More... | |
void | doEmergencyStop (const std::string &msg) |
Stops the robot and set navigation state to error. More... | |
virtual bool | changeSpeeds (const mrpt::kinematics::CVehicleVelCmd &vel_cmd) |
Default: forward call to m_robot.changeSpeed(). More... | |
virtual bool | changeSpeedsNOP () |
Default: forward call to m_robot.changeSpeedsNOP(). More... | |
virtual bool | stop (bool isEmergencyStop) |
Default: forward call to m_robot.stop(). More... | |
Protected Attributes | |
mrpt::math::CPolygon | m_robotShape |
The robot 2D shape model. More... | |
double | m_robotShapeCircularRadius |
Radius of the robot if approximated as a circle. More... | |
mrpt::maps::CSimplePointsMap | m_WS_Obstacles |
The obstacle points, as seen from the local robot frame. More... | |
mrpt::maps::CSimplePointsMap | m_WS_Obstacles_original |
Obstacle points, before filtering (if filtering is enabled). More... | |
std::vector< CAbstractHolonomicReactiveMethod::Ptr > | m_holonomicMethod |
The holonomic navigation algorithm (one object per PTG, so internal states are maintained) More... | |
std::unique_ptr< mrpt::io::CStream > | m_logFile |
mrpt::io::CStream * | m_prev_logfile |
The current log file stream, or nullptr if not being used. More... | |
bool | m_enableKeepLogRecords |
See enableKeepLogRecords. More... | |
CLogFileRecord | lastLogRecord |
The last log. More... | |
mrpt::kinematics::CVehicleVelCmd::Ptr | m_last_vel_cmd |
Last velocity commands. More... | |
std::recursive_mutex | m_critZoneLastLog |
Critical zones. More... | |
bool | m_enableConsoleOutput |
Enables / disables the console debug output. More... | |
bool | m_init_done |
Whether loadConfigFile() has been called or not. More... | |
mrpt::system::CTicTac | timerForExecutionPeriod |
mrpt::system::CTimeLogger | m_timelogger |
A complete time logger. More... | |
bool | m_PTGsMustBeReInitialized |
bool | m_closing_navigator |
Signal that the destructor has been called, so no more calls are accepted from other threads. More... | |
mrpt::system::TTimeStamp | m_WS_Obstacles_timestamp |
mrpt::maps::CPointCloudFilterBase::Ptr | m_WS_filter |
Default: none. More... | |
mrpt::nav::CMultiObjectiveMotionOptimizerBase::Ptr | m_multiobjopt |
std::vector< TInfoPerPTG > | m_infoPerPTG |
Temporary buffers for working with each PTG during a navigationStep() More... | |
mrpt::system::TTimeStamp | m_infoPerPTG_timestamp |
TSentVelCmd | m_lastSentVelCmd |
TWaypointStatusSequence | m_waypoint_nav_status |
The latest waypoints navigation command and the up-to-date control status. More... | |
std::recursive_mutex | m_nav_waypoints_cs |
std::vector< std::function< void(void)> > | m_pending_events |
Events generated during navigationStep(), enqueued to be called at the end of the method execution to avoid user code to change the navigator state. More... | |
TState | m_navigationState |
Current internal state of navigator: More... | |
std::unique_ptr< TNavigationParams > | m_navigationParams |
Current navigation parameters. More... | |
CRobot2NavInterface & | m_robot |
The navigator-robot interface. More... | |
std::weak_ptr< mrpt::poses::FrameTransformer< 2 > > | m_frame_tf |
Optional, user-provided frame transformer. More... | |
std::recursive_mutex | m_nav_cs |
mutex for all navigation methods More... | |
TRobotPoseVel | m_curPoseVel |
Current robot pose (updated in CAbstractNavigator::navigationStep() ) More... | |
double | m_last_curPoseVelUpdate_robot_time |
std::string | m_last_curPoseVelUpdate_pose_frame_id |
mrpt::poses::CPose2DInterpolator | m_latestPoses |
Latest robot poses (updated in CAbstractNavigator::navigationStep() ) More... | |
mrpt::poses::CPose2DInterpolator | m_latestOdomPoses |
mrpt::system::CTimeLogger | m_timlog_delays |
Time logger to collect delay-related stats. More... | |
double | m_badNavAlarm_minDistTarget |
For sending an alarm (error event) when it seems that we are not approaching toward the target in a while... More... | |
mrpt::system::TTimeStamp | m_badNavAlarm_lastMinDistTime |
VerbosityLevel | m_min_verbosity_level |
Provided messages with VerbosityLevel smaller than this value shall be ignored. More... | |
Private Member Functions | |
virtual void | STEP1_InitPTGs () override |
bool | implementSenseObstacles (mrpt::system::TTimeStamp &obs_timestamp) override |
Return false on any fatal error. More... | |
void | deleteHolonomicObjects () |
Delete m_holonomicMethod. More... | |
void | internal_onStartNewNavigation () |
Called before starting a new navigation. More... | |
std::string | generateStringFromFormat (const char *fmt, va_list argp) const |
Helper method for generating a std::string instance from printf-like arguments. More... | |
Private Attributes | |
std::vector< CParameterizedTrajectoryGenerator * > | PTGs |
The list of PTGs to use for navigation. More... | |
std::string | m_navlogfiles_dir |
Default: "./reactivenav.logs". More... | |
double | m_expr_var_k |
double | m_expr_var_k_target |
double | m_expr_var_num_paths |
std::unique_ptr< TNavigationParams > | m_copy_prev_navParams |
A copy of last-iteration navparams, used to detect changes. More... | |
bool | m_was_aligning |
Whether the last timestep was "is_aligning" in a waypoint with heading. More... | |
bool | m_is_aligning |
mrpt::system::TTimeStamp | m_last_alignment_cmd |
TState | m_lastNavigationState |
Last internal state of navigator: More... | |
bool | m_navigationEndEventSent |
Will be false until the navigation end is sent, and it is reset with each new command. More... | |
int | m_counter_check_target_is_blocked |
std::string | m_logger_name |
std::deque< TMsg > | m_history |
std::deque< output_logger_callback_t > | m_listCallbacks |
Navigation control API | |
virtual void | navigate (const TNavigationParams *params) |
Navigation request to a single target location. More... | |
virtual void | resume () |
Continues with suspended navigation. More... | |
virtual void | suspend () |
Suspend current navegation. More... | |
virtual void | resetNavError () |
Resets a NAV_ERROR state back to IDLE More... | |
TState | getCurrentState () const |
Returns the current navigator state. More... | |
void | setFrameTF (const std::weak_ptr< mrpt::poses::FrameTransformer< 2 >> &frame_tf) |
Sets a user-provided frame transformer object; used only if providing targets in a frame ID different than the one in which robot odometry is given (both IDs default to "map" ). More... | |
std::weak_ptr< mrpt::poses::FrameTransformer< 2 > > | getFrameTF () const |
Get the current frame tf object (defaults to nullptr) More... | |
enum | TState { IDLE = 0, NAVIGATING, SUSPENDED, NAV_ERROR } |
The different states for the navigation system. More... | |
Logging methods | |
bool | logging_enable_console_output |
[Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically. More... | |
bool | logging_enable_keep_record |
[Default=false] Enables storing all messages into an internal list. More... | |
void | logStr (const VerbosityLevel level, const std::string &msg_str) const |
Main method to add the specified message string to the logger. More... | |
void | logFmt (const VerbosityLevel level, const char *fmt,...) const MRPT_printf_format_check(3 |
Alternative logging method, which mimics the printf behavior. More... | |
void void | logCond (const VerbosityLevel level, bool cond, const std::string &msg_str) const |
Log the given message only if the condition is satisfied. More... | |
void | setLoggerName (const std::string &name) |
Set the name of the COutputLogger instance. More... | |
std::string | getLoggerName () const |
Return the name of the COutputLogger instance. More... | |
void | setMinLoggingLevel (const VerbosityLevel level) |
Set the minimum logging level for which the incoming logs are going to be taken into account. More... | |
void | setVerbosityLevel (const VerbosityLevel level) |
alias of setMinLoggingLevel() More... | |
VerbosityLevel | getMinLoggingLevel () const |
bool | isLoggingLevelVisible (VerbosityLevel level) const |
void | getLogAsString (std::string &log_contents) const |
Fill the provided string with the contents of the logger's history in std::string representation. More... | |
std::string | getLogAsString () const |
Get the history of COutputLogger instance in a string representation. More... | |
void | writeLogToFile (const std::string *fname_in=NULL) const |
Write the contents of the COutputLogger instance to an external file. More... | |
void | dumpLogToConsole () const |
Dump the current contents of the COutputLogger instance in the terminal window. More... | |
std::string | getLoggerLastMsg () const |
Return the last Tmsg instance registered in the logger history. More... | |
void | getLoggerLastMsg (std::string &msg_str) const |
Fill inputtted string with the contents of the last message in history. More... | |
void | loggerReset () |
Reset the contents of the logger instance. More... | |
void | logRegisterCallback (output_logger_callback_t userFunc) |
bool | logDeregisterCallback (output_logger_callback_t userFunc) |
|
inherited |
The different states for the navigation system.
Enumerator | |
---|---|
IDLE | |
NAVIGATING | |
SUSPENDED | |
NAV_ERROR |
Definition at line 172 of file CAbstractNavigator.h.
CReactiveNavigationSystem::CReactiveNavigationSystem | ( | CRobot2NavInterface & | react_iterf_impl, |
bool | enableConsoleOutput = true , |
||
bool | enableLogFile = false , |
||
const std::string & | logFileDirectory = std::string("./reactivenav.logs") |
||
) |
See docs in ctor of base class.
Definition at line 26 of file CReactiveNavigationSystem.cpp.
|
virtual |
Destructor.
Definition at line 36 of file CReactiveNavigationSystem.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::preDestructor(), and PTGs.
|
protectedinherited |
Definition at line 1516 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CLogFileRecord::additional_debug_msgs, mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), ASSERT_, mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::clearance, mrpt::nav::CLogFileRecord::TInfoPerPTG::clearance, mrpt::nav::CAbstractPTGBasedReactive::TInfoPerPTG::clearance, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::colfreedist_move_k, mrpt::containers::copy_container_typecasting(), mrpt::nav::CLogFileRecord::TInfoPerPTG::desiredDirection, mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::desiredDirection, mrpt::nav::CLogFileRecord::TInfoPerPTG::desiredSpeed, mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::desiredSpeed, mrpt::nav::TCandidateMovementPTG::direction, mrpt::nav::CAbstractHolonomicReactiveMethod::enableApproachTargetSlowDown(), mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::evaluate_clearance, mrpt::format(), mrpt::nav::CParameterizedTrajectoryGenerator::getAlphaValuesCount(), mrpt::nav::CParameterizedTrajectoryGenerator::getDescription(), mrpt::nav::CAbstractPTGBasedReactive::getPTG_count(), mrpt::nav::CParameterizedTrajectoryGenerator::getRefDistance(), mrpt::nav::CLogFileRecord::TInfoPerPTG::HLFR, mrpt::hypot_fast(), mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha(), mrpt::nav::CLogFileRecord::infoPerPTG, mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), mrpt::nav::CParameterizedTrajectoryGenerator::initTPObstacles(), mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), mrpt::system::CTimeLogger::isEnabled(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::logRecord, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractPTGBasedReactive::m_enableKeepLogRecords, mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd, mrpt::nav::CAbstractPTGBasedReactive::m_logFile, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::maxObstacleDist, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::maxRobotSpeed, mrpt::nav::CParameterizedTrajectoryGenerator::maxTimeInVelCmdNOP(), min, mrpt::nav::CAbstractHolonomicReactiveMethod::navigate(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::obstacles, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, mrpt::nav::TCandidateMovementPTG::props, mrpt::nav::TCandidateMovementPTG::PTG, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_alpha_index, mrpt::nav::CLogFileRecord::TInfoPerPTG::PTG_desc, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_index, mrpt::system::CTimeLogger::registerUserMeasure(), mrpt::nav::CAbstractPTGBasedReactive::TNavigationParamsPTG::restrict_PTG_indices, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::secure_distance_end, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::secure_distance_start, mrpt::nav::TCandidateMovementPTG::speed, mrpt::nav::CAbstractPTGBasedReactive::STEP3_WSpaceToTPSpace(), mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP(), mrpt::system::CTicTac::Tac(), mrpt::nav::CAbstractNavigator::TNavigationParams::target, mrpt::nav::CAbstractPTGBasedReactive::PTGTarget::target_alpha, mrpt::nav::CAbstractPTGBasedReactive::PTGTarget::target_dist, mrpt::nav::CAbstractPTGBasedReactive::PTGTarget::target_k, mrpt::nav::CAbstractNavigator::TargetInfo::targetDesiredRelSpeed, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::targets, mrpt::nav::CAbstractPTGBasedReactive::TInfoPerPTG::targets, mrpt::system::CTicTac::Tic(), mrpt::nav::CAbstractPTGBasedReactive::tictac, mrpt::nav::CLogFileRecord::TInfoPerPTG::timeForHolonomicMethod, mrpt::nav::CLogFileRecord::TInfoPerPTG::timeForTPObsTransformation, mrpt::nav::CLogFileRecord::TInfoPerPTG::TP_Obstacles, mrpt::nav::CAbstractPTGBasedReactive::TInfoPerPTG::TP_Obstacles, mrpt::nav::CAbstractPTGBasedReactive::PTGTarget::TP_Target, mrpt::nav::CLogFileRecord::TInfoPerPTG::TP_Targets, mrpt::nav::CParameterizedTrajectoryGenerator::updateClearancePost(), mrpt::nav::CAbstractPTGBasedReactive::PTGTarget::valid_TP, mrpt::nav::CAbstractNavigator::TRobotPoseVel::velLocal, mrpt::math::TTwist2D::vx, mrpt::math::TTwist2D::vy, mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Scores holonomicMovement.
Definition at line 989 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CLogFileRecord::additional_debug_msgs, mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), mrpt::math::angDistance(), ASSERT_, ASSERT_EQUAL_, mrpt::math::TPose2D::asString(), mrpt::nav::TCandidateMovementPTG::direction, mrpt::nav::CParameterizedTrajectoryGenerator::directionToMotionCommand(), mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(), mrpt::nav::CParameterizedTrajectoryGenerator::evalPathRelativePriority(), mrpt::format(), mrpt::nav::ClearanceDiagram::getClearance(), mrpt::nav::CParameterizedTrajectoryGenerator::getPathDist(), mrpt::nav::CParameterizedTrajectoryGenerator::getPathPose(), mrpt::nav::CParameterizedTrajectoryGenerator::getPathStepDuration(), mrpt::nav::CParameterizedTrajectoryGenerator::getPathStepForDist(), mrpt::nav::CParameterizedTrajectoryGenerator::getRefDistance(), mrpt::nav::CParameterizedTrajectoryGenerator::getScorePriority(), mrpt::hypot_fast(), mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha(), mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), mrpt::nav::CParameterizedTrajectoryGenerator::isBijectiveAt(), mrpt::keep_min(), mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod, mrpt::nav::CAbstractPTGBasedReactive::m_last_vel_cmd, mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::max_dist_for_timebased_path_prediction, min, MRPT_END, MRPT_START, mrpt::system::now(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::original_holo_eval, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, mrpt::math::TPose2D::phi, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::poseVel, mrpt::nav::TCandidateMovementPTG::props, mrpt::nav::TCandidateMovementPTG::PTG, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_alpha_index, mrpt::nav::CAbstractNavigator::TRobotPoseVel::rawOdometry, mrpt::round(), mrpt::nav::TCandidateMovementPTG::speed, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::speed_scale, mrpt::nav::TCandidateMovementPTG::starting_robot_dir, mrpt::nav::TCandidateMovementPTG::starting_robot_dist, mrpt::nav::CParameterizedTrajectoryGenerator::supportSpeedAtTarget(), mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::tim_send_cmd_vel, mrpt::system::timeDifference(), mrpt::nav::CLogFileRecord::TInfoPerPTG::TP_Robot, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::was_slowdown, mrpt::math::TPoint2D::x, mrpt::math::TPose2D::x, mrpt::math::TPoint2D::y, and mrpt::math::TPose2D::y.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate().
|
overridevirtualinherited |
Cancel current navegation.
Reimplemented from mrpt::nav::CAbstractNavigator.
Definition at line 105 of file CWaypointsNavigator.cpp.
References mrpt::nav::CAbstractNavigator::cancel(), mrpt::nav::CWaypointsNavigator::m_nav_waypoints_cs, and mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status.
|
inlineinherited |
Changes the current, global (honored for all PTGs) robot speed limits, via returning a reference to a structure that holds those limits.
Definition at line 275 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, and mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::robot_absolute_speed_limits.
void CReactiveNavigationSystem::changeRobotCircularShapeRadius | ( | const double | R | ) |
Defines the 2D circular robot shape radius, used for some PTGs for collision checking.
Definition at line 57 of file CReactiveNavigationSystem.cpp.
References ASSERT_, mrpt::nav::CAbstractPTGBasedReactive::m_PTGsMustBeReInitialized, m_robotShapeCircularRadius, and R.
Referenced by loadConfigFile().
void CReactiveNavigationSystem::changeRobotShape | ( | const mrpt::math::CPolygon & | shape | ) |
Defines the 2D polygonal robot shape, used for some PTGs for collision checking.
Definition at line 48 of file CReactiveNavigationSystem.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::m_PTGsMustBeReInitialized, m_robotShape, THROW_EXCEPTION, and mrpt::math::CPolygon::verticesCount().
Referenced by loadConfigFile().
|
protectedvirtualinherited |
Default: forward call to m_robot.changeSpeed().
Can be overriden.
Definition at line 412 of file CAbstractNavigator.cpp.
References mrpt::nav::CRobot2NavInterface::changeSpeeds(), and mrpt::nav::CAbstractNavigator::m_robot.
Referenced by mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedvirtualinherited |
Default: forward call to m_robot.changeSpeedsNOP().
Can be overriden.
Definition at line 418 of file CAbstractNavigator.cpp.
References mrpt::nav::CRobot2NavInterface::changeSpeedsNOP(), and mrpt::nav::CAbstractNavigator::m_robot.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
overridevirtual |
Checks whether the robot shape, when placed at the given pose (relative to the current pose), is colliding with any of the latest known obstacles.
Default implementation: always returns false.
Reimplemented from mrpt::nav::CAbstractNavigator.
Definition at line 307 of file CReactiveNavigationSystem.cpp.
References ASSERT_, mrpt::maps::CPointsMap::getPointsBuffer(), mrpt::math::TPose2D::inverseComposePoint(), m_WS_Obstacles, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::max_obstacles_height, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::min_obstacles_height, params_reactive_nav, PTGs, R, mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
overrideprotectedvirtualinherited |
Default implementation: check if target_dist is below the accepted distance.
If true is returned here, the end-of-navigation event will be sent out (only for non-intermediary targets).
Reimplemented from mrpt::nav::CAbstractNavigator.
Definition at line 547 of file CWaypointsNavigator.cpp.
References mrpt::system::dateTimeLocalToString(), mrpt::nav::TWaypointStatus::getAsText(), INVALID_TIMESTAMP, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status, MRPT_LOG_DEBUG_STREAM, and mrpt::nav::TWaypointStatus::reached.
|
privateinherited |
Delete m_holonomicMethod.
Definition at line 214 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::preDestructor(), and mrpt::nav::CAbstractPTGBasedReactive::setHolonomicMethod().
|
protectedinherited |
Definition at line 249 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_pending_events.
Referenced by mrpt::nav::CWaypointsNavigator::navigationStep(), and mrpt::nav::CAbstractNavigator::navigationStep().
|
protectedinherited |
Stops the robot and set navigation state to error.
Definition at line 260 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_LOG_ERROR, mrpt::nav::CAbstractNavigator::NAV_ERROR, and mrpt::nav::CAbstractNavigator::stop().
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
inherited |
Dump the current contents of the COutputLogger instance in the terminal window.
Definition at line 179 of file COutputLogger.cpp.
|
inlineinherited |
Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord()
Definition at line 162 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::m_enableKeepLogRecords.
|
inherited |
Enables/disables saving log files.
Definition at line 132 of file CAbstractPTGBasedReactive.cpp.
References mrpt::system::createDirectory(), mrpt::system::directoryExists(), mrpt::system::fileExists(), mrpt::format(), mrpt::nav::CAbstractPTGBasedReactive::m_logFile, mrpt::nav::CAbstractNavigator::m_nav_cs, mrpt::nav::CAbstractPTGBasedReactive::m_navlogfiles_dir, MRPT_LOG_DEBUG, MRPT_LOG_ERROR_FMT, mrpt::io::CFileGZOutputStream::open(), mrpt::system::os::sprintf(), and THROW_EXCEPTION_FMT.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::CAbstractPTGBasedReactive().
|
inlineinherited |
Enables/disables the detailed time logger (default:disabled upon construction) When enabled, a report will be dumped to std::cout upon destruction.
Definition at line 250 of file CAbstractPTGBasedReactive.h.
References mrpt::system::CTimeLogger::enable(), and mrpt::nav::CAbstractPTGBasedReactive::m_timelogger.
|
protectedvirtualinherited |
Return the [0,1] velocity scale of raw PTG cmd_vel.
Definition at line 1392 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), mrpt::nav::TCandidateMovementPTG::direction, mrpt::nav::CParameterizedTrajectoryGenerator::directionToMotionCommand(), mrpt::math::LowPassFilter_IIR1::getLastOutput(), mrpt::nav::CParameterizedTrajectoryGenerator::getSupportedKinematicVelocityCommand(), mrpt::nav::CAbstractPTGBasedReactive::m_last_vel_cmd, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractPTGBasedReactive::meanExecutionPeriod, MRPT_LOG_ERROR_STREAM, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, mrpt::nav::TCandidateMovementPTG::PTG, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::robot_absolute_speed_limits, mrpt::nav::TCandidateMovementPTG::speed, and mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::speedfilter_tau.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
privateinherited |
Helper method for generating a std::string instance from printf-like arguments.
Definition at line 99 of file COutputLogger.cpp.
References mrpt::system::os::vsnprintf().
|
inlineinherited |
Get the current, global (honored for all PTGs) robot speed limits.
Definition at line 267 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, and mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::robot_absolute_speed_limits.
|
inlineinherited |
Returns the current navigator state.
Definition at line 181 of file CAbstractNavigator.h.
References mrpt::nav::CAbstractNavigator::m_navigationState.
|
inlineinherited |
Gives access to a const-ref to the internal time logger used to estimate delays.
Definition at line 225 of file CAbstractNavigator.h.
References mrpt::nav::CAbstractNavigator::m_timlog_delays.
|
inlineinherited |
Get the current frame tf object (defaults to nullptr)
Definition at line 191 of file CAbstractNavigator.h.
References mrpt::nav::CAbstractNavigator::m_frame_tf.
|
inherited |
Provides a copy of the last log record with information about execution.
o | An object where the log will be stored into. |
Definition at line 208 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::lastLogRecord, and mrpt::nav::CAbstractPTGBasedReactive::m_critZoneLastLog.
|
inherited |
Get the history of COutputLogger instance in a string representation.
Definition at line 148 of file COutputLogger.cpp.
Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::getDescriptiveReport().
|
inherited |
Fill the provided string with the contents of the logger's history in std::string representation.
Definition at line 143 of file COutputLogger.cpp.
|
inlineinherited |
Definition at line 175 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::m_navlogfiles_dir.
|
inherited |
Return the last Tmsg instance registered in the logger history.
Definition at line 184 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::TMsg::getAsString().
|
inherited |
Fill inputtted string with the contents of the last message in history.
Definition at line 190 of file COutputLogger.cpp.
|
inherited |
Return the name of the COutputLogger instance.
Definition at line 132 of file COutputLogger.cpp.
Referenced by mrpt::system::COutputLogger::TMsg::TMsg().
|
inlineinherited |
Definition at line 200 of file system/COutputLogger.h.
References mrpt::system::COutputLogger::m_min_verbosity_level.
Referenced by mrpt::maps::CRandomFieldGridMap2D::isEnabledVerbose(), and mrpt::slam::CMetricMapBuilderRBPF::processActionObservation().
|
inlineoverridevirtual |
Gets the i'th PTG.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 91 of file CReactiveNavigationSystem.h.
|
inlineoverridevirtual |
Gets the i'th PTG.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 86 of file CReactiveNavigationSystem.h.
Referenced by STEP3_WSpaceToTPSpace().
|
inlineoverridevirtual |
Returns the number of different PTGs that have been setup.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 85 of file CReactiveNavigationSystem.h.
References PTGs.
|
inherited |
Returns this parameter for the first inner holonomic navigator instances [m] (should be the same in all of them?)
Definition at line 1993 of file CAbstractPTGBasedReactive.cpp.
References ASSERT_, and mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod.
|
inlineinherited |
Gives access to a const-ref to the internal time logger.
Definition at line 253 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::m_timelogger.
|
inlineinherited |
Get a copy of the control structure which describes the progress status of the waypoint navigation.
Definition at line 95 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
virtualinherited |
Get a copy of the control structure which describes the progress status of the waypoint navigation.
Definition at line 97 of file CWaypointsNavigator.cpp.
References mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status.
|
overrideprotectedvirtualinherited |
Implements the way to waypoint is free function in children classes: true
must be returned if, according to the information gathered at the last navigation step, there is a free path to the given point; false
otherwise: if way is blocked or there is missing information, the point is out of range, etc.
Implements mrpt::nav::CWaypointsNavigator.
Definition at line 1442 of file CAbstractPTGBasedReactive.cpp.
References ASSERT_, mrpt::nav::CParameterizedTrajectoryGenerator::getPathCount(), mrpt::nav::CAbstractPTGBasedReactive::getPTG(), mrpt::nav::CAbstractPTGBasedReactive::getPTG_count(), INVALID_TIMESTAMP, mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG, mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG_timestamp, MRPT_END, MRPT_START, mrpt::system::now(), mrpt::system::timeDifference(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
overrideprivatevirtual |
Return false on any fatal error.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 184 of file CReactiveNavigationSystem.cpp.
References mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractNavigator::m_robot, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractNavigator::m_timlog_delays, mrpt::nav::CAbstractPTGBasedReactive::m_WS_filter, m_WS_Obstacles, m_WS_Obstacles_original, MRPT_LOG_ERROR_STREAM, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, and mrpt::nav::CRobot2NavInterface::senseObstacles().
|
overridevirtualinherited |
Must be called for loading collision grids, or the first navigation command may last a long time to be executed.
Internally, it just calls STEP1_CollisionGridsBuilder().
Implements mrpt::nav::CAbstractNavigator.
Definition at line 116 of file CAbstractPTGBasedReactive.cpp.
References ASSERT_, INVALID_TIMESTAMP, mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG_timestamp, mrpt::nav::CAbstractPTGBasedReactive::m_multiobjopt, mrpt::nav::CAbstractNavigator::m_nav_cs, and mrpt::nav::CAbstractPTGBasedReactive::STEP1_InitPTGs().
|
privateinherited |
Called before starting a new navigation.
Internally, it calls to child-implemented onStartNewNavigation()
Definition at line 485 of file CAbstractNavigator.cpp.
References mrpt::poses::CPoseInterpolatorBase< DIM >::clear(), mrpt::nav::CAbstractNavigator::m_latestOdomPoses, mrpt::nav::CAbstractNavigator::m_latestPoses, mrpt::nav::CAbstractNavigator::m_robot, mrpt::nav::CAbstractNavigator::onStartNewNavigation(), and mrpt::nav::CRobot2NavInterface::startWatchdog().
Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating().
|
inlineinherited |
Definition at line 201 of file system/COutputLogger.h.
References mrpt::system::COutputLogger::m_min_verbosity_level.
Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper().
|
inherited |
Returns true
if, according to the information gathered at the last navigation step, there is a free path to the given point; false
otherwise: if way is blocked or there is missing information, the point is out of range for the existing PTGs, etc.
Definition at line 478 of file CWaypointsNavigator.cpp.
References mrpt::nav::CWaypointsNavigator::impl_waypoint_is_reachable().
|
overridevirtual |
Loads all params from a file.
To be called before initialize(). Each derived class MUST load its own parameters, and then call ITS PARENT'S overriden method to ensure all params are loaded.
Reimplemented from mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 76 of file CReactiveNavigationSystem.cpp.
References mrpt::math::CPolygon::AddVertex(), ASSERT_, ASSERTMSG_, changeRobotCircularShapeRadius(), changeRobotShape(), mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::format(), mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::loadFromConfigFile(), MRPT_END, MRPT_START, params_reactive_nav, and PTGs.
|
inherited |
Log the given message only if the condition is satisfied.
Definition at line 120 of file COutputLogger.cpp.
|
inherited |
Definition at line 287 of file COutputLogger.cpp.
References getAddress().
|
inherited |
Alternative logging method, which mimics the printf behavior.
Handy for not having to first use mrpt::format to pass a std::string message to logStr
Definition at line 80 of file COutputLogger.cpp.
Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::CICPCriteriaNRD(), mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), CGraphSlamHandler< GRAPH_T >::execute(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), CGraphSlamHandler< GRAPH_T >::initOutputDir(), CGraphSlamHandler< GRAPH_T >::initVisualization(), mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), CGraphSlamHandler< GRAPH_T >::readConfigFname(), CGraphSlamHandler< GRAPH_T >::saveResults(), CGraphSlamHandler< GRAPH_T >::setResultsDirName(), STEP1_InitPTGs(), and CGraphSlamHandler< GRAPH_T >::~CGraphSlamHandler().
|
inherited |
Reset the contents of the logger instance.
Called upon construction.
Definition at line 195 of file COutputLogger.cpp.
References mrpt::system::LVL_INFO.
|
overrideprotectedvirtual |
Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the current timestep.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 264 of file CReactiveNavigationSystem.cpp.
References mrpt::math::CPolygon::GetVertex_x(), mrpt::math::CPolygon::GetVertex_y(), m_robotShape, m_robotShapeCircularRadius, m_WS_Obstacles, m_WS_Obstacles_original, mrpt::nav::CLogFileRecord::robotShape_radius, mrpt::nav::CLogFileRecord::robotShape_x, mrpt::nav::CLogFileRecord::robotShape_y, mrpt::nav::CLogFileRecord::WS_Obstacles, and mrpt::nav::CLogFileRecord::WS_Obstacles_original.
|
inherited |
Definition at line 274 of file COutputLogger.cpp.
|
inherited |
Main method to add the specified message string to the logger.
Definition at line 61 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::TMsg::body, mrpt::system::COutputLogger::TMsg::dumpToConsole(), mrpt::system::COutputLogger::TMsg::level, mrpt::system::COutputLogger::TMsg::name, and mrpt::system::COutputLogger::TMsg::timestamp.
Referenced by mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(), STEP1_InitPTGs(), and mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper().
|
virtualinherited |
Navigation request to a single target location.
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 if it was dynamically allocated.) |
Reimplemented in mrpt::nav::CNavigatorManualSequence.
Definition at line 314 of file CAbstractNavigator.cpp.
References MRPT_END, MRPT_START, mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().
|
virtualinherited |
Waypoint navigation request.
This immediately cancels any other previous on-going navigation.
Definition at line 67 of file CWaypointsNavigator.cpp.
References ASSERT_, ASSERTMSG_, mrpt::nav::CWaypointsNavigator::m_nav_waypoints_cs, mrpt::nav::CAbstractNavigator::m_pending_events, mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status, MRPT_END, MRPT_START, mrpt::system::now(), mrpt::nav::CWaypointsNavigator::onNavigateCommandReceived(), mrpt::nav::TWaypointStatusSequence::timestamp_nav_started, mrpt::nav::TWaypointStatusSequence::waypoint_index_current_goal, mrpt::nav::TWaypointSequence::waypoints, and mrpt::nav::TWaypointStatusSequence::waypoints.
|
overridevirtualinherited |
This method must be called periodically in order to effectively run the navigation.
Reimplemented from mrpt::nav::CAbstractNavigator.
Definition at line 448 of file CWaypointsNavigator.cpp.
References mrpt::nav::CAbstractNavigator::dispatchPendingNavEvents(), mrpt::nav::CWaypointsNavigator::m_is_aligning, mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_END, MRPT_START, mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractNavigator::SUSPENDED, and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
overrideprotectedvirtualinherited |
Called after each call to CAbstractNavigator::navigate()
Reimplemented from mrpt::nav::CAbstractNavigator.
Definition at line 55 of file CWaypointsNavigator.cpp.
References INVALID_TIMESTAMP, mrpt::nav::CWaypointsNavigator::m_nav_waypoints_cs, mrpt::nav::CWaypointsNavigator::m_was_aligning, mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status, mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), mrpt::nav::TWaypointStatusSequence::timestamp_nav_started, and mrpt::nav::TWaypointStatusSequence::waypoint_index_current_goal.
Referenced by mrpt::nav::CWaypointsNavigator::navigateWaypoints().
|
overrideprotectedvirtualinherited |
Called whenever a new navigation has been started.
Can be used to reset state variables, etc.
Reimplemented from mrpt::nav::CWaypointsNavigator.
Definition at line 1488 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractNavigator::m_last_curPoseVelUpdate_robot_time, mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd, mrpt::nav::CWaypointsNavigator::onStartNewNavigation(), and mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::reset().
|
overrideprotectedvirtualinherited |
The main method for the navigator.
The main method: executes one time-iteration of the reactive navigation algorithm.
Allow PTGs to be responsive to target location, dynamics, etc.
Implements mrpt::nav::CAbstractNavigator.
Definition at line 246 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CLogFileRecord::additional_debug_msgs, mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), mrpt::serialization::archiveFrom(), ASSERT_, ASSERT_EQUAL_, mrpt::math::TPose2D::asString(), mrpt::poses::CPose2D::asTPose(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractNavigator::changeSpeeds(), mrpt::nav::CAbstractNavigator::changeSpeedsNOP(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::colfreedist_move_k, mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::curVelLocal, mrpt::nav::TCandidateMovementPTG::direction, mrpt::nav::CAbstractNavigator::doEmergencyStop(), mrpt::nav::CAbstractPTGBasedReactive::executionTime, mrpt::math::LowPassFilter_IIR1::filter(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::final_evaluation, mrpt::format(), mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd(), mrpt::nav::CRobot2NavInterface::getEmergencyStopCmd(), mrpt::math::LowPassFilter_IIR1::getLastOutput(), mrpt::system::CTimeLogger::getLastTime(), mrpt::nav::CAbstractPTGBasedReactive::getPTG(), mrpt::nav::CAbstractPTGBasedReactive::getPTG_count(), mrpt::nav::CLogFileRecord::infoPerPTG, mrpt::poses::CPoseInterpolatorBase< DIM >::interpolate(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::isValid(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::log_entries, mrpt::nav::CAbstractPTGBasedReactive::m_closing_navigator, mrpt::nav::CAbstractPTGBasedReactive::m_copy_prev_navParams, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractPTGBasedReactive::m_enableConsoleOutput, mrpt::nav::CAbstractPTGBasedReactive::m_enableKeepLogRecords, mrpt::nav::CAbstractNavigator::m_frame_tf, mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod, mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG, mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG_timestamp, mrpt::nav::CAbstractPTGBasedReactive::m_init_done, mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd, mrpt::nav::CAbstractNavigator::m_latestOdomPoses, mrpt::nav::CAbstractNavigator::m_latestPoses, mrpt::nav::CAbstractPTGBasedReactive::m_logFile, mrpt::nav::CAbstractPTGBasedReactive::m_multiobjopt, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractNavigator::m_pending_events, mrpt::nav::CAbstractPTGBasedReactive::m_prev_logfile, mrpt::nav::CAbstractNavigator::m_robot, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractNavigator::m_timlog_delays, mrpt::nav::CAbstractPTGBasedReactive::m_WS_Obstacles_timestamp, mrpt::nav::CParameterizedTrajectoryGenerator::maxTimeInVelCmdNOP(), mrpt::nav::CAbstractPTGBasedReactive::meanExecutionPeriod, mrpt::nav::CAbstractPTGBasedReactive::meanExecutionTime, mrpt::nav::CAbstractPTGBasedReactive::meanTotalExecutionTime, MRPT_LOG_DEBUG, MRPT_LOG_DEBUG_FMT, MRPT_LOG_WARN_FMT, mrpt::nav::CLogFileRecord::navDynState, mrpt::system::now(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::original_holo_eval, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose_frame_id, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::poseVel, mrpt::nav::TCandidateMovementPTG::props, mrpt::nav::TCandidateMovementPTG::PTG, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_alpha_index, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_dynState, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_index, mrpt::nav::CAbstractNavigator::TRobotPoseVel::rawOdometry, mrpt::nav::CLogFileRecord::relPoseSense, mrpt::nav::CLogFileRecord::relPoseVelCmd, mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::relTarget, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::reset(), mrpt::io::CMemoryStream::Seek(), mrpt::nav::CRobot2NavInterface::sendApparentCollisionEvent(), mrpt::nav::TCandidateMovementPTG::speed, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::speed_scale, mrpt::nav::CAbstractPTGBasedReactive::STEP1_InitPTGs(), mrpt::nav::CAbstractPTGBasedReactive::STEP2_SenseObstacles(), mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord(), mrpt::nav::CAbstractNavigator::stop(), mrpt::nav::CParameterizedTrajectoryGenerator::supportSpeedAtTarget(), mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP(), mrpt::system::CTicTac::Tac(), mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::targetRelSpeed, THROW_EXCEPTION, THROW_EXCEPTION_FMT, mrpt::system::CTicTac::Tic(), mrpt::nav::CAbstractPTGBasedReactive::tim_changeSpeed_avr, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::tim_send_cmd_vel, mrpt::system::timeDifference(), mrpt::nav::CAbstractPTGBasedReactive::timerForExecutionPeriod, mrpt::nav::CAbstractNavigator::TRobotPoseVel::timestamp, mrpt::system::timestampAdd(), mrpt::nav::CLogFileRecord::timestamps, mrpt::nav::CAbstractPTGBasedReactive::timoff_curPoseAndSpeed_avr, mrpt::nav::CAbstractPTGBasedReactive::timoff_obstacles_avr, mrpt::nav::CAbstractPTGBasedReactive::timoff_sendVelCmd_avr, mrpt::nav::CAbstractPTGBasedReactive::totalExecutionTime, mrpt::nav::CParameterizedTrajectoryGenerator::updateNavDynamicState(), mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::use_delays_model, mrpt::nav::CLogFileRecord::values, mrpt::nav::CAbstractNavigator::TRobotPoseVel::velLocal, and mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::was_slowdown.
|
protectedvirtualinherited |
Factorization of the part inside navigationStep(), for the case of state being NAVIGATING.
Performs house-hold tasks like raising events in case of starting/ending navigation, timeout reaching destination, etc. call_virtual_nav_method
can be set to false to avoid calling the virtual method performNavigationStep()
Definition at line 494 of file CAbstractNavigator.cpp.
References ASSERT_, mrpt::nav::CAbstractNavigator::checkCollisionWithLatestObstacles(), mrpt::nav::CAbstractNavigator::checkHasReachedTarget(), mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams::dist_check_target_is_blocked, mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams::dist_to_target_for_sending_event, mrpt::math::TSegment2D::distance(), mrpt::poses::CPoseInterpolatorBase< DIM >::empty(), mrpt::format(), mrpt::system::getCurrentTime(), mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams::hysteresis_check_target_is_blocked, mrpt::nav::CAbstractNavigator::IDLE, mrpt::nav::CAbstractNavigator::internal_onStartNewNavigation(), mrpt::system::COutputLogger::logFmt(), mrpt::system::LVL_WARN, mrpt::nav::CAbstractNavigator::m_badNavAlarm_lastMinDistTime, mrpt::nav::CAbstractNavigator::m_badNavAlarm_minDistTarget, mrpt::nav::CAbstractNavigator::m_counter_check_target_is_blocked, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractNavigator::m_lastNavigationState, mrpt::nav::CAbstractNavigator::m_latestPoses, mrpt::nav::CAbstractNavigator::m_navigationEndEventSent, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractNavigator::m_navigationState, mrpt::nav::CAbstractNavigator::m_pending_events, mrpt::nav::CAbstractNavigator::m_robot, MRPT_LOG_DEBUG, MRPT_LOG_ERROR, MRPT_LOG_ERROR_FMT, MRPT_LOG_INFO, MRPT_LOG_THROTTLE_WARN, MRPT_LOG_WARN, mrpt::nav::CAbstractNavigator::NAV_ERROR, mrpt::nav::CAbstractNavigator::NAVIGATING, mrpt::nav::CAbstractNavigator::params_abstract_navigator, mrpt::nav::CAbstractNavigator::performNavigationStep(), mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::poses::CPoseInterpolatorBase< DIM >::rbegin(), mrpt::nav::CRobot2NavInterface::sendNavigationEndEvent(), mrpt::nav::CRobot2NavInterface::sendNavigationStartEvent(), mrpt::nav::CRobot2NavInterface::sendWaySeemsBlockedEvent(), mrpt::poses::CPoseInterpolatorBase< DIM >::size(), mrpt::nav::CAbstractNavigator::stop(), mrpt::system::timeDifference(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
Referenced by mrpt::nav::CAbstractNavigator::navigationStep(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
To be called during children destructors to assure thread-safe destruction, and free of shared objects.
Definition at line 87 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::deleteHolonomicObjects(), mrpt::nav::CAbstractPTGBasedReactive::m_closing_navigator, mrpt::nav::CAbstractPTGBasedReactive::m_logFile, mrpt::nav::CAbstractNavigator::m_nav_cs, and mrpt::nav::CAbstractNavigator::stop().
Referenced by mrpt::nav::CAbstractPTGBasedReactive::~CAbstractPTGBasedReactive(), ~CReactiveNavigationSystem(), and mrpt::nav::CReactiveNavigationSystem3D::~CReactiveNavigationSystem3D().
|
protectedinherited |
Does the job of navigate(), except the call to onNavigateCommandReceived()
Definition at line 281 of file CAbstractNavigator.cpp.
References ASSERT_, mrpt::system::getCurrentTime(), mrpt::nav::CAbstractNavigator::m_badNavAlarm_lastMinDistTime, mrpt::nav::CAbstractNavigator::m_badNavAlarm_minDistTarget, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractNavigator::m_nav_cs, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_END, MRPT_START, mrpt::nav::CAbstractNavigator::NAVIGATING, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
Referenced by mrpt::nav::CAbstractNavigator::navigate(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
virtualinherited |
Resets a NAV_ERROR
state back to IDLE
Definition at line 145 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::IDLE, mrpt::nav::CAbstractNavigator::m_nav_cs, mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_LOG_DEBUG, and mrpt::nav::CAbstractNavigator::NAV_ERROR.
|
virtualinherited |
Continues with suspended navigation.
Definition at line 122 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_nav_cs, mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_LOG_DEBUG, mrpt::nav::CAbstractNavigator::NAVIGATING, and mrpt::nav::CAbstractNavigator::SUSPENDED.
|
overridevirtual |
Saves all current options to a config file.
Each derived class MUST save its own parameters, and then call ITS PARENT'S overriden method to ensure all params are saved.
Reimplemented from mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 64 of file CReactiveNavigationSystem.cpp.
References MRPT_SAVE_CONFIG_VAR_COMMENT, params_reactive_nav, PTGs, mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile(), and mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::saveToConfigFile().
|
inherited |
Sets a user-provided frame transformer object; used only if providing targets in a frame ID different than the one in which robot odometry is given (both IDs default to "map"
).
Definition at line 153 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_frame_tf.
|
inherited |
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.
Available methods: class names of those derived from CAbstractHolonomicReactiveMethod
Definition at line 219 of file CAbstractPTGBasedReactive.cpp.
References ASSERT_, mrpt::nav::CAbstractPTGBasedReactive::deleteHolonomicObjects(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), mrpt::nav::CAbstractPTGBasedReactive::getPTG(), mrpt::nav::CAbstractPTGBasedReactive::getPTG_count(), mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod, mrpt::nav::CAbstractNavigator::m_nav_cs, and THROW_EXCEPTION_FMT.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile().
|
inlineinherited |
Changes the prefix for new log files.
Definition at line 171 of file CAbstractPTGBasedReactive.h.
References mrpt::nav::CAbstractPTGBasedReactive::m_navlogfiles_dir.
|
inherited |
Set the name of the COutputLogger instance.
Definition at line 127 of file COutputLogger.cpp.
Referenced by mrpt::slam::CMetricMapBuilderICP::CMetricMapBuilderICP(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::slam::CMonteCarloLocalization2D::CMonteCarloLocalization2D(), mrpt::slam::CMonteCarloLocalization3D::CMonteCarloLocalization3D(), and mrpt::graphslam::CWindowManager::initCWindowManager().
|
inherited |
Set the minimum logging level for which the incoming logs are going to be taken into account.
String messages with specified VerbosityLevel smaller than the min, will not be outputted to the screen and neither will a record of them be stored in by the COutputLogger instance
Definition at line 133 of file COutputLogger.cpp.
Referenced by mrpt::maps::CRandomFieldGridMap2D::enableVerbose(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), mrpt::hwdrivers::CHokuyoURG::initialize(), and mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::loadParams().
|
inherited |
Changes this parameter in all inner holonomic navigator instances [m].
Definition at line 1984 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod.
|
inherited |
alias of setMinLoggingLevel()
Definition at line 138 of file COutputLogger.cpp.
Referenced by mrpt::nav::CAbstractNavigator::CAbstractNavigator(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::comms::CServerTCPSocket::CServerTCPSocket(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::math::ransac_detect_2D_lines().
|
overrideprivatevirtual |
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 137 of file CReactiveNavigationSystem.cpp.
References mrpt::format(), mrpt::system::COutputLogger::logFmt(), mrpt::system::COutputLogger::logStr(), mrpt::system::LVL_INFO, mrpt::nav::CAbstractPTGBasedReactive::m_enableConsoleOutput, mrpt::nav::CAbstractPTGBasedReactive::m_PTGsMustBeReInitialized, m_robotShape, m_robotShapeCircularRadius, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::ptg_cache_files_directory, PTGs, mrpt::nav::CPTG_RobotShape_Polygonal::setRobotShape(), and mrpt::nav::CPTG_RobotShape_Circular::setRobotShapeRadius().
|
protectedinherited |
Definition at line 1482 of file CAbstractPTGBasedReactive.cpp.
References mrpt::nav::CAbstractPTGBasedReactive::implementSenseObstacles(), and mrpt::nav::CAbstractPTGBasedReactive::m_WS_Obstacles_timestamp.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
overrideprotectedvirtual |
Builds TP-Obstacles from Workspace obstacles for the given PTG.
"out_TPObstacles" is already initialized to the proper length and maximum collision-free distance for each "k" trajectory index. Distances are in "pseudo-meters". They will be normalized automatically to [0,1] upon return.
Implements mrpt::nav::CAbstractPTGBasedReactive.
Definition at line 224 of file CReactiveNavigationSystem.cpp.
References mrpt::poses::CPose2D::composePoint(), mrpt::maps::CPointsMap::getPointsBuffer(), getPTG(), m_WS_Obstacles, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::max_obstacles_height, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams::min_obstacles_height, mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator, params_reactive_nav, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::ref_distance, mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance(), and mrpt::nav::CParameterizedTrajectoryGenerator::updateTPObstacle().
|
protectedinherited |
Definition at line 923 of file CAbstractPTGBasedReactive.cpp.
References mrpt::serialization::archiveFrom(), mrpt::nav::CLogFileRecord::cmd_vel, mrpt::nav::CLogFileRecord::cur_vel, mrpt::nav::CLogFileRecord::cur_vel_local, mrpt::system::CTimeLogger::enter(), mrpt::math::LowPassFilter_IIR1::getLastOutput(), mrpt::system::CTimeLogger::getLastTime(), mrpt::nav::CAbstractPTGBasedReactive::lastLogRecord, mrpt::system::CTimeLogger::leave(), mrpt::nav::CAbstractPTGBasedReactive::loggingGetWSObstaclesAndShape(), mrpt::nav::CAbstractPTGBasedReactive::m_critZoneLastLog, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd, mrpt::nav::CAbstractPTGBasedReactive::m_logFile, mrpt::nav::CAbstractPTGBasedReactive::m_timelogger, mrpt::nav::CAbstractNavigator::m_timlog_delays, mrpt::nav::CAbstractPTGBasedReactive::meanExecutionPeriod, mrpt::nav::CAbstractPTGBasedReactive::meanExecutionTime, mrpt::nav::CLogFileRecord::nPTGs, mrpt::nav::CLogFileRecord::nSelectedPTG, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_alpha_index, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_dynState, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::ptg_index, mrpt::nav::CLogFileRecord::ptg_index_NOP, mrpt::nav::CLogFileRecord::ptg_last_k_NOP, mrpt::nav::CLogFileRecord::ptg_last_navDynState, mrpt::nav::CAbstractNavigator::TRobotPoseVel::rawOdometry, mrpt::nav::CLogFileRecord::rel_cur_pose_wrt_last_vel_cmd_NOP, mrpt::nav::CLogFileRecord::rel_pose_PTG_origin_wrt_sense_NOP, mrpt::nav::CLogFileRecord::robotPoseLocalization, mrpt::nav::CLogFileRecord::robotPoseOdometry, mrpt::nav::CAbstractPTGBasedReactive::tim_changeSpeed_avr, mrpt::nav::CAbstractNavigator::TRobotPoseVel::timestamp, mrpt::nav::CLogFileRecord::timestamps, mrpt::nav::CLogFileRecord::values, mrpt::nav::CAbstractNavigator::TRobotPoseVel::velGlobal, mrpt::nav::CAbstractNavigator::TRobotPoseVel::velLocal, and mrpt::nav::CLogFileRecord::WS_targets_relative.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedvirtualinherited |
Default: forward call to m_robot.stop().
Can be overriden.
Definition at line 420 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_robot, and mrpt::nav::CRobot2NavInterface::stop().
Referenced by mrpt::nav::CAbstractNavigator::cancel(), mrpt::nav::CAbstractNavigator::doEmergencyStop(), mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::nav::CAbstractPTGBasedReactive::preDestructor(), mrpt::nav::CAbstractNavigator::suspend(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
virtualinherited |
Suspend current navegation.
Definition at line 131 of file CAbstractNavigator.cpp.
References mrpt::nav::CAbstractNavigator::m_nav_cs, mrpt::nav::CAbstractNavigator::m_navigationState, MRPT_LOG_DEBUG, mrpt::nav::CAbstractNavigator::NAVIGATING, mrpt::nav::CAbstractNavigator::stop(), and mrpt::nav::CAbstractNavigator::SUSPENDED.
|
protectedinherited |
Call to the robot getCurrentPoseAndSpeeds() and updates members m_curPoseVel accordingly.
If an error is returned by the user callback, first, it calls robot.stop() ,then throws an std::runtime_error exception.
Definition at line 323 of file CAbstractNavigator.cpp.
References mrpt::poses::CPoseInterpolatorBase< DIM >::begin(), mrpt::poses::CPoseInterpolatorBase< DIM >::clear(), mrpt::poses::CPoseInterpolatorBase< DIM >::erase(), mrpt::nav::CRobot2NavInterface::getCurrentPoseAndSpeeds(), mrpt::nav::CRobot2NavInterface::getNavigationTime(), mrpt::poses::CPoseInterpolatorBase< DIM >::insert(), mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CAbstractNavigator::m_last_curPoseVelUpdate_pose_frame_id, mrpt::nav::CAbstractNavigator::m_last_curPoseVelUpdate_robot_time, mrpt::nav::CAbstractNavigator::m_latestOdomPoses, mrpt::nav::CAbstractNavigator::m_latestPoses, mrpt::nav::CAbstractNavigator::m_navigationState, mrpt::nav::CAbstractNavigator::m_robot, mrpt::nav::CAbstractNavigator::m_timlog_delays, MRPT_LOG_ERROR, MRPT_LOG_THROTTLE_DEBUG_FMT, mrpt::nav::CAbstractNavigator::NAV_ERROR, mrpt::math::TPose2D::phi, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose_frame_id, PREVIOUS_POSES_MAX_AGE, mrpt::nav::CAbstractNavigator::TRobotPoseVel::rawOdometry, mrpt::poses::CPoseInterpolatorBase< DIM >::rbegin(), mrpt::math::TTwist2D::rotate(), mrpt::poses::CPoseInterpolatorBase< DIM >::size(), mrpt::nav::CAbstractNavigator::stop(), mrpt::system::timeDifference(), mrpt::nav::CAbstractNavigator::TRobotPoseVel::timestamp, mrpt::nav::CAbstractNavigator::TRobotPoseVel::velGlobal, and mrpt::nav::CAbstractNavigator::TRobotPoseVel::velLocal.
Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::nav::CAbstractNavigator::processNavigateCommand(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
inlineprotectedinherited |
Definition at line 168 of file CWaypointsNavigator.h.
References mrpt::nav::CWaypointsNavigator::m_is_aligning.
|
protectedvirtualinherited |
The waypoints-specific part of navigationStep()
Definition at line 115 of file CWaypointsNavigator.cpp.
References mrpt::nav::TWaypoint::allowed_distance, mrpt::math::angDistance(), ASSERT_, mrpt::nav::CAbstractNavigator::changeSpeeds(), mrpt::math::TSegment2D::distance(), mrpt::nav::TWaypointStatusSequence::final_goal_reached, mrpt::nav::CRobot2NavInterface::getAlignCmd(), mrpt::nav::CWaypointsNavigator::getWaypointNavStatus(), mrpt::nav::CWaypointsNavigator::impl_waypoint_is_reachable(), mrpt::nav::TWaypoint::INVALID_NUM, mrpt::poses::CPose2D::inverseComposePoint(), mrpt::nav::TWaypointStatusSequence::last_robot_pose, mrpt::nav::CAbstractNavigator::m_curPoseVel, mrpt::nav::CWaypointsNavigator::m_is_aligning, mrpt::nav::CWaypointsNavigator::m_last_alignment_cmd, mrpt::nav::CWaypointsNavigator::m_nav_waypoints_cs, mrpt::nav::CAbstractNavigator::m_pending_events, mrpt::nav::CAbstractNavigator::m_robot, mrpt::nav::CAbstractNavigator::m_timlog_delays, mrpt::nav::CWaypointsNavigator::m_was_aligning, mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams::max_distance_to_allow_skip_waypoint, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams::min_timesteps_confirm_skip_waypoints, MRPT_END, MRPT_LOG_DEBUG_STREAM, MRPT_LOG_INFO_FMT, MRPT_LOG_THROTTLE_INFO_FMT, MRPT_START, mrpt::nav::CWaypointsNavigator::TNavigationParamsWaypoints::multiple_targets, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams::multitarget_look_ahead, mrpt::math::TPoint2D::norm(), mrpt::system::now(), mrpt::nav::CWaypointsNavigator::params_waypoints_navigator, mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::math::TPose2D::phi, mrpt::math::TSegment2D::point1, mrpt::math::TSegment2D::point2, mrpt::nav::CAbstractNavigator::TRobotPoseVel::pose, mrpt::nav::CAbstractNavigator::processNavigateCommand(), mrpt::RAD2DEG(), mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams::rel_speed_for_stop_waypoints, mrpt::nav::CRobot2NavInterface::sendNewWaypointTargetEvent(), mrpt::nav::CRobot2NavInterface::sendWaypointReachedEvent(), mrpt::square(), mrpt::nav::CAbstractNavigator::stop(), mrpt::nav::TWaypoint::target, mrpt::nav::CAbstractNavigator::TNavigationParams::target, mrpt::nav::CAbstractNavigator::TargetInfo::target_coords, mrpt::nav::TWaypoint::target_frame_id, mrpt::nav::CAbstractNavigator::TargetInfo::target_frame_id, mrpt::nav::TWaypoint::target_heading, mrpt::nav::CAbstractNavigator::TargetInfo::targetAllowedDistance, mrpt::nav::CAbstractNavigator::TargetInfo::targetDesiredRelSpeed, mrpt::nav::CAbstractNavigator::TargetInfo::targetIsIntermediaryWaypoint, mrpt::nav::CAbstractNavigator::TargetInfo::targetIsRelative, mrpt::system::timeDifference(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), mrpt::nav::TWaypointStatusSequence::waypoint_index_current_goal, mrpt::nav::TWaypointStatusSequence::waypoints, mrpt::math::TPoint2D::x, mrpt::math::TPose2D::x, mrpt::math::TPoint2D::y, and mrpt::math::TPose2D::y.
Referenced by mrpt::nav::CWaypointsNavigator::navigationStep().
|
inherited |
Write the contents of the COutputLogger instance to an external file.
Upon call to this method, COutputLogger dumps the contents of all the logged commands so far to the specified external file. By default the filename is set to ${LOGGERNAME}.log except if the fname parameter is provided
Definition at line 154 of file COutputLogger.cpp.
References ASSERTMSG_, and mrpt::format().
|
protectedinherited |
Definition at line 319 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
The last log.
Definition at line 300 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::getLastLogRecord(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
inherited |
[Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically.
Definition at line 239 of file system/COutputLogger.h.
|
inherited |
[Default=false] Enables storing all messages into an internal list.
Definition at line 242 of file system/COutputLogger.h.
|
staticinherited |
Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor.
Implementation file for the COutputLogger header class.
Handy for coloring the input based on the verbosity of the message
Definition at line 124 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::TMsg::dumpToConsole().
|
staticinherited |
Map from VerbosityLevels to their corresponding names.
Handy for printing the current message VerbosityLevel along with the actual content
Definition at line 129 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::TMsg::getAsString().
|
protectedinherited |
Definition at line 344 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().
|
protectedinherited |
For sending an alarm (error event) when it seems that we are not approaching toward the target in a while...
Definition at line 343 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().
|
protectedinherited |
Signal that the destructor has been called, so no more calls are accepted from other threads.
Definition at line 405 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::preDestructor().
|
privateinherited |
A copy of last-iteration navparams, used to detect changes.
Definition at line 474 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
privateinherited |
Definition at line 236 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating().
|
protectedinherited |
Critical zones.
Definition at line 305 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::getLastLogRecord(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Current robot pose (updated in CAbstractNavigator::navigationStep() )
Definition at line 332 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), implementSenseObstacles(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::nav::CAbstractNavigator::processNavigateCommand(), mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
Enables / disables the console debug output.
Definition at line 308 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), STEP1_InitPTGs(), and mrpt::nav::CReactiveNavigationSystem3D::STEP1_InitPTGs().
|
protectedinherited |
See enableKeepLogRecords.
Definition at line 298 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::enableKeepLogRecords(), and mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
privateinherited |
Definition at line 472 of file CAbstractPTGBasedReactive.h.
|
privateinherited |
Definition at line 472 of file CAbstractPTGBasedReactive.h.
|
privateinherited |
Definition at line 472 of file CAbstractPTGBasedReactive.h.
|
protectedinherited |
Optional, user-provided frame transformer.
Definition at line 313 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::getFrameTF(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractNavigator::setFrameTF().
|
mutableprivateinherited |
Definition at line 312 of file system/COutputLogger.h.
|
protectedinherited |
The holonomic navigation algorithm (one object per PTG, so internal states are maintained)
Definition at line 293 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CAbstractPTGBasedReactive::deleteHolonomicObjects(), mrpt::nav::CAbstractPTGBasedReactive::getTargetApproachSlowDownDistance(), mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile(), mrpt::nav::CAbstractPTGBasedReactive::setHolonomicMethod(), and mrpt::nav::CAbstractPTGBasedReactive::setTargetApproachSlowDownDistance().
|
protectedinherited |
Temporary buffers for working with each PTG during a navigationStep()
Definition at line 424 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::impl_waypoint_is_reachable(), and mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 425 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::impl_waypoint_is_reachable(), mrpt::nav::CAbstractPTGBasedReactive::initialize(), and mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Whether loadConfigFile() has been called or not.
Definition at line 310 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), and mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
privateinherited |
Definition at line 173 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::navigationStep(), mrpt::nav::CWaypointsNavigator::waypoints_isAligning(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
privateinherited |
Definition at line 174 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
Definition at line 334 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
protectedinherited |
Definition at line 333 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::onStartNewNavigation(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
protectedinherited |
Last velocity commands.
Definition at line 302 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), and mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd().
|
privateinherited |
Last internal state of navigator:
Definition at line 232 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::navigationStep(), and mrpt::nav::CAbstractNavigator::performNavigationStepNavigating().
|
protectedinherited |
Definition at line 463 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CAbstractPTGBasedReactive::onStartNewNavigation(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Definition at line 336 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::CAbstractNavigator(), mrpt::nav::CAbstractNavigator::internal_onStartNewNavigation(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
protectedinherited |
Latest robot poses (updated in CAbstractNavigator::navigationStep() )
Definition at line 336 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::CAbstractNavigator(), mrpt::nav::CAbstractNavigator::internal_onStartNewNavigation(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
privateinherited |
Definition at line 314 of file system/COutputLogger.h.
|
protectedinherited |
Definition at line 294 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::enableLogFile(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractPTGBasedReactive::preDestructor(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
privateinherited |
Definition at line 310 of file system/COutputLogger.h.
|
protectedinherited |
Provided messages with VerbosityLevel smaller than this value shall be ignored.
Definition at line 252 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::getMinLoggingLevel(), and mrpt::system::COutputLogger::isLoggingLevelVisible().
|
protectedinherited |
Definition at line 411 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::initialize(), mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile().
|
protectedinherited |
mutex for all navigation methods
Definition at line 316 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::cancel(), mrpt::nav::CAbstractPTGBasedReactive::enableLogFile(), mrpt::nav::CAbstractPTGBasedReactive::initialize(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), mrpt::nav::CAbstractPTGBasedReactive::preDestructor(), mrpt::nav::CAbstractNavigator::processNavigateCommand(), mrpt::nav::CAbstractNavigator::resetNavError(), mrpt::nav::CAbstractNavigator::resume(), mrpt::nav::CAbstractPTGBasedReactive::setHolonomicMethod(), and mrpt::nav::CAbstractNavigator::suspend().
|
protectedinherited |
|
privateinherited |
Will be false until the navigation end is sent, and it is reset with each new command.
Definition at line 235 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), and mrpt::nav::CAbstractNavigator::performNavigationStepNavigating().
|
protectedinherited |
Current navigation parameters.
Definition at line 307 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CWaypointsNavigator::checkHasReachedTarget(), mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().
|
protectedinherited |
Current internal state of navigator:
Definition at line 305 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::cancel(), mrpt::nav::CAbstractNavigator::doEmergencyStop(), mrpt::nav::CAbstractNavigator::getCurrentState(), mrpt::nav::CWaypointsNavigator::navigationStep(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::nav::CAbstractNavigator::processNavigateCommand(), mrpt::nav::CAbstractNavigator::resetNavError(), mrpt::nav::CAbstractNavigator::resume(), mrpt::nav::CAbstractNavigator::suspend(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
privateinherited |
Default: "./reactivenav.logs".
Definition at line 470 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::enableLogFile(), mrpt::nav::CAbstractPTGBasedReactive::getLogFileDirectory(), and mrpt::nav::CAbstractPTGBasedReactive::setLogFileDirectory().
|
protectedinherited |
Events generated during navigationStep(), enqueued to be called at the end of the method execution to avoid user code to change the navigator state.
Definition at line 246 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::dispatchPendingNavEvents(), mrpt::nav::CWaypointsNavigator::navigateWaypoints(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
The current log file stream, or nullptr if not being used.
Definition at line 296 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 315 of file CAbstractPTGBasedReactive.h.
Referenced by changeRobotCircularShapeRadius(), changeRobotShape(), mrpt::nav::CReactiveNavigationSystem3D::changeRobotShape(), mrpt::nav::CReactiveNavigationSystem3D::loadConfigFile(), mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), STEP1_InitPTGs(), and mrpt::nav::CReactiveNavigationSystem3D::STEP1_InitPTGs().
|
protectedinherited |
The navigator-robot interface.
Definition at line 310 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::changeSpeeds(), mrpt::nav::CAbstractNavigator::changeSpeedsNOP(), implementSenseObstacles(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::nav::CNavigatorManualSequence::initialize(), mrpt::nav::CAbstractNavigator::internal_onStartNewNavigation(), mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::nav::CAbstractNavigator::stop(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protected |
The robot 2D shape model.
Only one of robot_shape
or robot_shape_circular_radius
will be used in each PTG
Definition at line 137 of file CReactiveNavigationSystem.h.
Referenced by changeRobotShape(), loggingGetWSObstaclesAndShape(), and STEP1_InitPTGs().
|
protected |
Radius of the robot if approximated as a circle.
Only one of robot_shape
or robot_shape_circular_radius
will be used in each PTG
Definition at line 141 of file CReactiveNavigationSystem.h.
Referenced by changeRobotCircularShapeRadius(), loggingGetWSObstaclesAndShape(), and STEP1_InitPTGs().
|
protectedinherited |
A complete time logger.
Definition at line 314 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::enableTimeLog(), mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd(), mrpt::nav::CAbstractPTGBasedReactive::getTimeLogger(), implementSenseObstacles(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), STEP1_InitPTGs(), mrpt::nav::CReactiveNavigationSystem3D::STEP1_InitPTGs(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Time logger to collect delay-related stats.
Definition at line 339 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::getDelaysTimeLogger(), implementSenseObstacles(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::nav::CAbstractNavigator::navigationStep(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
privateinherited |
Whether the last timestep was "is_aligning" in a waypoint with heading.
Definition at line 172 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::onNavigateCommandReceived(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
The latest waypoints navigation command and the up-to-date control status.
Definition at line 148 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::cancel(), mrpt::nav::CWaypointsNavigator::checkHasReachedTarget(), mrpt::nav::CWaypointsNavigator::getWaypointNavStatus(), mrpt::nav::CWaypointsNavigator::navigateWaypoints(), mrpt::nav::CWaypointsNavigator::onNavigateCommandReceived(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
protectedinherited |
Default: none.
Definition at line 409 of file CAbstractPTGBasedReactive.h.
Referenced by implementSenseObstacles(), and mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile().
|
protected |
The obstacle points, as seen from the local robot frame.
Definition at line 149 of file CReactiveNavigationSystem.h.
Referenced by checkCollisionWithLatestObstacles(), implementSenseObstacles(), loggingGetWSObstaclesAndShape(), and STEP3_WSpaceToTPSpace().
|
protected |
Obstacle points, before filtering (if filtering is enabled).
Definition at line 151 of file CReactiveNavigationSystem.h.
Referenced by implementSenseObstacles(), and loggingGetWSObstaclesAndShape().
|
protectedinherited |
Definition at line 407 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP2_SenseObstacles().
|
protectedinherited |
Runtime estimation of execution period of the method.
Definition at line 323 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Definition at line 320 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Definition at line 321 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
inherited |
Definition at line 221 of file CAbstractNavigator.h.
Referenced by mrpt::nav::CAbstractNavigator::loadConfigFile(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::saveConfigFile().
|
inherited |
Definition at line 238 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CAbstractPTGBasedReactive::changeCurrentRobotSpeedLimits(), mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd(), mrpt::nav::CAbstractPTGBasedReactive::getCurrentRobotSpeedLimits(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile(), STEP1_InitPTGs(), mrpt::nav::CReactiveNavigationSystem3D::STEP1_InitPTGs(), and STEP3_WSpaceToTPSpace().
TReactiveNavigatorParams mrpt::nav::CReactiveNavigationSystem::params_reactive_nav |
Definition at line 115 of file CReactiveNavigationSystem.h.
Referenced by checkCollisionWithLatestObstacles(), loadConfigFile(), saveConfigFile(), and STEP3_WSpaceToTPSpace().
|
inherited |
Definition at line 138 of file CWaypointsNavigator.h.
Referenced by mrpt::nav::CWaypointsNavigator::loadConfigFile(), mrpt::nav::CWaypointsNavigator::saveConfigFile(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
private |
The list of PTGs to use for navigation.
Definition at line 124 of file CReactiveNavigationSystem.h.
Referenced by checkCollisionWithLatestObstacles(), getPTG(), getPTG_count(), loadConfigFile(), saveConfigFile(), STEP1_InitPTGs(), and ~CReactiveNavigationSystem().
|
protectedinherited |
Definition at line 319 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate().
|
protectedinherited |
Definition at line 324 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
protectedinherited |
Definition at line 311 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 325 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 324 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 325 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
|
protectedinherited |
Definition at line 319 of file CAbstractPTGBasedReactive.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |