Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
mrpt::nav::CAbstractPTGBasedReactive Class Referenceabstract

Detailed Description

Base class for reactive navigator systems based on TP-Space, with an arbitrary holonomic reactive method running on it and any number of PTGs for transforming the navigation space.

Both, the holonomic method and the PTGs can be customized by the apropriate user derived classes.

How to use:

For working examples, refer to the source code of the apps:

Publications:

Available "variables" or "score names" for each motion candidate (these can be used in runtime-compiled expressions in the configuration files of motion deciders):

See also
CReactiveNavigationSystem, CReactiveNavigationSystem3D

Definition at line 74 of file CAbstractPTGBasedReactive.h.

#include <mrpt/nav/reactive/CAbstractPTGBasedReactive.h>

Inheritance diagram for mrpt::nav::CAbstractPTGBasedReactive:
Inheritance graph

Classes

struct  PTGTarget
 
struct  TAbstractPTGNavigatorParams
 
struct  TInfoPerPTG
 
struct  TNavigationParamsPTG
 The struct for configuring navigation requests to CAbstractPTGBasedReactive and derived classes. More...
 
struct  TSentVelCmd
 

Public Member Functions

 CAbstractPTGBasedReactive (CRobot2NavInterface &react_iterf_impl, bool enableConsoleOutput=true, bool enableLogFile=false, const std::string &logFileDirectory=std::string("./reactivenav.logs"))
 Constructor. More...
 
virtual ~CAbstractPTGBasedReactive ()
 
void initialize () MRPT_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::utils::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 setHolonomicMethod (THolonomicMethod method, const mrpt::utils::CConfigFileBase &cfgBase)
 
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
 
virtual void loadConfigFile (const mrpt::utils::CConfigFileBase &c) MRPT_OVERRIDE
 Loads all params from a file. More...
 
virtual void saveConfigFile (mrpt::utils::CConfigFileBase &c) const MRPT_OVERRIDE
 Saves all current options to a config file. More...
 
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::utils::CTimeLoggergetTimeLogger () const
 Gives access to a const-ref to the internal time logger. More...
 
virtual size_t getPTG_count () const =0
 Returns the number of different PTGs that have been setup. More...
 
virtual CParameterizedTrajectoryGeneratorgetPTG (size_t i)=0
 Gets the i'th PTG. More...
 
virtual const CParameterizedTrajectoryGeneratorgetPTG (size_t i) const =0
 Gets the i'th PTG. More...
 
const mrpt::kinematics::CVehicleVelCmd::TVelCmdParamsgetCurrentRobotSpeedLimits () const
 Get the current, global (honored for all PTGs) robot speed limits. More...
 
mrpt::kinematics::CVehicleVelCmd::TVelCmdParamschangeCurrentRobotSpeedLimits ()
 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 () MRPT_OVERRIDE
 This method must be called periodically in order to effectively run the navigation. More...
 
virtual void cancel () MRPT_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::utils::CTimeLoggergetDelaysTimeLogger () const
 Gives access to a const-ref to the internal time logger used to estimate delays. More...
 
Waypoint navigation control API
virtual void navigateWaypoints (const TWaypointSequence &nav_request)
 Waypoint navigation request. More...
 
virtual void getWaypointNavStatus (TWaypointStatusSequence &out_nav_status) const
 Get a copy of the control structure which describes the progress status of the waypoint navigation. More...
 
TWaypointStatusSequence getWaypointNavStatus () const
 Get a copy of the control structure which describes the progress status of the waypoint navigation. More...
 

Public Attributes

TAbstractPTGNavigatorParams params_abstract_ptg_navigator
 
TWaypointsNavigatorParams params_waypoints_navigator
 
TAbstractNavigatorParams params_abstract_navigator
 

Protected Member Functions

virtual void performNavigationStep () MRPT_OVERRIDE
 The main method for the navigator. More...
 
virtual CAbstractHolonomicReactiveMethodgetHoloMethod (int idx)
 
virtual bool impl_waypoint_is_reachable (const mrpt::math::TPoint2D &wp_local_wrt_robot) const MRPT_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...
 
virtual void STEP1_InitPTGs ()=0
 
virtual bool implementSenseObstacles (mrpt::system::TTimeStamp &obs_timestamp)=0
 Return false on any fatal error. More...
 
bool STEP2_SenseObstacles ()
 
virtual 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)=0
 Builds TP-Obstacles from Workspace obstacles for the given PTG. More...
 
virtual void loggingGetWSObstaclesAndShape (CLogFileRecord &out_log)=0
 Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the current timestep. More...
 
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::CHolonomicLogFileRecordPtr &hlfr)
 Scores holonomicMovement. More...
 
virtual double generate_vel_cmd (const TCandidateMovementPTG &in_movement, mrpt::kinematics::CVehicleVelCmdPtr &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::CVehicleVelCmdPtr &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 () MRPT_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::poses::CPose2D())
 
virtual void onNavigateCommandReceived () MRPT_OVERRIDE
 Called after each call to CAbstractNavigator::navigate() More...
 
virtual bool checkHasReachedTarget (const double targetDist) const MRPT_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 ()
 
virtual void processNavigateCommand (const TNavigationParams *params)
 Does the job of navigate(), except the call to onNavigateCommandReceived() More...
 
virtual 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...
 
virtual 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(). Can be overriden. More...
 
virtual bool changeSpeedsNOP ()
 Default: forward call to m_robot.changeSpeedsNOP(). Can be overriden. More...
 
virtual bool stop (bool isEmergencyStop)
 Default: forward call to m_robot.stop(). Can be overriden. More...
 
virtual bool checkCollisionWithLatestObstacles (const mrpt::math::TPose2D &relative_robot_pose) const
 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...
 

Protected Attributes

std::vector< CAbstractHolonomicReactiveMethod * > m_holonomicMethod
 The holonomic navigation algorithm (one object per PTG, so internal states are maintained) More...
 
mrpt::utils::CStreamm_logFile
 
mrpt::utils::CStreamm_prev_logfile
 The current log file stream, or NULL if not being used. More...
 
bool m_enableKeepLogRecords
 See enableKeepLogRecords. More...
 
CLogFileRecord lastLogRecord
 The last log. More...
 
mrpt::kinematics::CVehicleVelCmdPtr m_last_vel_cmd
 Last velocity commands. More...
 
mrpt::synch::CCriticalSectionRecursive 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::utils::CTicTac timerForExecutionPeriod
 
mrpt::utils::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::CPointCloudFilterBasePtr m_WS_filter
 Default: none. More...
 
mrpt::nav::CMultiObjectiveMotionOptimizerBasePtr m_multiobjopt
 
std::vector< TInfoPerPTGm_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...
 
mrpt::synch::CCriticalSectionRecursive m_nav_waypoints_cs
 
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
 
std::list< TPendingEventm_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...
 
TNavigationParamsm_navigationParams
 Current navigation parameters. More...
 
CRobot2NavInterfacem_robot
 The navigator-robot interface. More...
 
mrpt::poses::FrameTransformer< 2 > * m_frame_tf
 Optional, user-provided frame transformer. More...
 
mrpt::synch::CCriticalSectionRecursive 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
 
mrpt::poses::CPose2DInterpolator m_latestOdomPoses
 Latest robot poses (updated in CAbstractNavigator::navigationStep() ) More...
 
mrpt::utils::CTimeLogger m_timlog_delays
 Time logger to collect delay-related stats. More...
 
mrpt::utils::CTimeLogger m_navProfiler
 Publicly available time profiling object. 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
 
Variables for CReactiveNavigationSystem::performNavigationStep
mrpt::utils::CTicTac totalExecutionTime
 
mrpt::utils::CTicTac executionTime
 
mrpt::utils::CTicTac tictac
 
mrpt::math::LowPassFilter_IIR1 meanExecutionTime
 
mrpt::math::LowPassFilter_IIR1 meanTotalExecutionTime
 
mrpt::math::LowPassFilter_IIR1 meanExecutionPeriod
 Runtime estimation of execution period of the method. More...
 
mrpt::math::LowPassFilter_IIR1 tim_changeSpeed_avr
 
mrpt::math::LowPassFilter_IIR1 timoff_obstacles_avr
 
mrpt::math::LowPassFilter_IIR1 timoff_curPoseAndSpeed_avr
 
mrpt::math::LowPassFilter_IIR1 timoff_sendVelCmd_avr
 

Private Member Functions

void deleteHolonomicObjects ()
 Delete m_holonomicMethod. More...
 

Private Attributes

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
 
TNavigationParamsm_copy_prev_navParams
 A copy of last-iteration navparams, used to detect changes. More...
 

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...
 
const TErrorReasongetErrorReason () const
 In case of state=NAV_ERROR, this returns the reason for the error. More...
 
void setFrameTF (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...
 
const mrpt::poses::FrameTransformer< 2 > * getFrameTF () const
 Get the current frame tf object (defaults to nullptr) More...
 
void enableRethrowNavExceptions (const bool enable)
 By default, error exceptions on navigationStep() will dump an error message to the output logger interface. More...
 
bool isRethrowNavExceptionsEnabled () const
 
enum  TState { IDLE =0, NAVIGATING, SUSPENDED, NAV_ERROR }
 The different states for the navigation system. More...
 
enum  TErrorCode { ERR_NONE =0, ERR_EMERGENCY_STOP, ERR_CANNOT_REACH_TARGET, ERR_OTHER }
 Explains the reason for the navigation error. More...
 

Member Enumeration Documentation

◆ TErrorCode

Explains the reason for the navigation error.

Enumerator
ERR_NONE 
ERR_EMERGENCY_STOP 
ERR_CANNOT_REACH_TARGET 
ERR_OTHER 

Definition at line 131 of file CAbstractNavigator.h.

◆ TState

The different states for the navigation system.

Enumerator
IDLE 
NAVIGATING 
SUSPENDED 
NAV_ERROR 

In this case, use getErrorReason()

Definition at line 120 of file CAbstractNavigator.h.

Constructor & Destructor Documentation

◆ CAbstractPTGBasedReactive()

CAbstractPTGBasedReactive::CAbstractPTGBasedReactive ( CRobot2NavInterface react_iterf_impl,
bool  enableConsoleOutput = true,
bool  enableLogFile = false,
const std::string logFileDirectory = std::string("./reactivenav.logs") 
)

Constructor.

Parameters
[in]react_iterf_implAn instance of an object that implement all the required interfaces to read from and control a robot.
[in]enableConsoleOutputCan be set to false to reduce verbosity.
[in]enableLogFileSet to true to enable creation of navigation log files, useful for inspection and debugging.

Definition at line 57 of file CAbstractPTGBasedReactive.cpp.

References enableLogFile().

◆ ~CAbstractPTGBasedReactive()

CAbstractPTGBasedReactive::~CAbstractPTGBasedReactive ( )
virtual

Member Function Documentation

◆ build_movement_candidate()

void CAbstractPTGBasedReactive::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::poses::CPose2D() 
)
protected

Definition at line 1324 of file CAbstractPTGBasedReactive.cpp.

References mrpt::nav::CLogFileRecord::additional_debug_msgs, mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), ASSERT_, calc_move_candidate_scores(), mrpt::nav::CLogFileRecord::TInfoPerPTG::clearance, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::clearance, mrpt::nav::CAbstractPTGBasedReactive::TInfoPerPTG::clearance, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::colfreedist_move_k, mrpt::utils::metaprogramming::copy_container_typecasting(), mrpt::nav::CLogFileRecord_VFF::Create(), 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::mrpt::format(), mrpt::nav::CParameterizedTrajectoryGenerator::getAlphaValuesCount(), mrpt::nav::CParameterizedTrajectoryGenerator::getDescription(), getPTG_count(), mrpt::nav::CParameterizedTrajectoryGenerator::getRefDistance(), mrpt::nav::CLogFileRecord::TInfoPerPTG::HLFR, mrpt::mrpt::math::hypot_fast(), mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha(), mrpt::nav::CLogFileRecord::infoPerPTG, mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), mrpt::nav::CParameterizedTrajectoryGenerator::initTPObstacles(), mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), mrpt::utils::CTimeLogger::isEnabled(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::logRecord, mrpt::nav::CAbstractNavigator::m_curPoseVel, m_enableKeepLogRecords, m_lastSentVelCmd, m_logFile, mrpt::nav::CAbstractNavigator::m_navProfiler, 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, 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::utils::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, STEP3_WSpaceToTPSpace(), mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP(), mrpt::utils::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::utils::CTicTac::Tic(), 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 performNavigationStep().

◆ calc_move_candidate_scores()

void CAbstractPTGBasedReactive::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::CHolonomicLogFileRecordPtr &  hlfr 
)
protected

Scores holonomicMovement.

Definition at line 890 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::mrpt::format(), mrpt::nav::ClearanceDiagram::getClearance(), getHoloMethod(), 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::nav::CAbstractHolonomicReactiveMethod::getTargetApproachSlowDownDistance(), mrpt::mrpt::math::hypot_fast(), mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha(), mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), mrpt::nav::CParameterizedTrajectoryGenerator::isBijectiveAt(), mrpt::mrpt::utils::keep_min(), mrpt::nav::CAbstractNavigator::m_curPoseVel, m_holonomicMethod, m_last_vel_cmd, m_lastSentVelCmd, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractNavigator::m_navProfiler, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::max_dist_for_timebased_path_prediction, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::max_distance_predicted_actual_path, min, MRPT_END, MRPT_START, mrpt::system::now(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::original_holo_eval, 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::utils::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::CAbstractNavigator::TNavigationParams::target, mrpt::nav::CAbstractNavigator::TargetInfo::targetDesiredRelSpeed, 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 build_movement_candidate().

◆ cancel()

void CWaypointsNavigator::cancel ( )
virtualinherited

◆ changeCurrentRobotSpeedLimits()

mrpt::kinematics::CVehicleVelCmd::TVelCmdParams& mrpt::nav::CAbstractPTGBasedReactive::changeCurrentRobotSpeedLimits ( )
inline

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 203 of file CAbstractPTGBasedReactive.h.

References mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::robot_absolute_speed_limits.

◆ changeSpeeds()

bool CAbstractNavigator::changeSpeeds ( const mrpt::kinematics::CVehicleVelCmd vel_cmd)
protectedvirtualinherited

◆ changeSpeedsNOP()

bool CAbstractNavigator::changeSpeedsNOP ( )
protectedvirtualinherited

Default: forward call to m_robot.changeSpeedsNOP(). Can be overriden.

Definition at line 423 of file CAbstractNavigator.cpp.

References mrpt::nav::CRobot2NavInterface::changeSpeedsNOP(), and mrpt::nav::CAbstractNavigator::m_robot.

Referenced by performNavigationStep().

◆ checkCollisionWithLatestObstacles()

bool CAbstractNavigator::checkCollisionWithLatestObstacles ( const mrpt::math::TPose2D relative_robot_pose) const
protectedvirtualinherited

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 in mrpt::nav::CReactiveNavigationSystem3D, and mrpt::nav::CReactiveNavigationSystem.

Definition at line 631 of file CAbstractNavigator.cpp.

Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating().

◆ checkHasReachedTarget()

bool CWaypointsNavigator::checkHasReachedTarget ( const double  targetDist) const
protectedvirtualinherited

◆ deleteHolonomicObjects()

void CAbstractPTGBasedReactive::deleteHolonomicObjects ( )
private

Delete m_holonomicMethod.

Definition at line 211 of file CAbstractPTGBasedReactive.cpp.

References m_holonomicMethod.

Referenced by preDestructor(), and setHolonomicMethod().

◆ dispatchPendingNavEvents()

void CAbstractNavigator::dispatchPendingNavEvents ( )
protectedinherited

◆ doEmergencyStop()

void CAbstractNavigator::doEmergencyStop ( const std::string msg)
protectedvirtualinherited

◆ enableKeepLogRecords()

void mrpt::nav::CAbstractPTGBasedReactive::enableKeepLogRecords ( bool  enable = true)
inline

Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord()

Definition at line 126 of file CAbstractPTGBasedReactive.h.

◆ enableLogFile()

void CAbstractPTGBasedReactive::enableLogFile ( bool  enable)

◆ enableRethrowNavExceptions()

void mrpt::nav::CAbstractNavigator::enableRethrowNavExceptions ( const bool  enable)
inlineinherited

By default, error exceptions on navigationStep() will dump an error message to the output logger interface.

If rethrow is enabled (default=false), the error message will be reported as well, but exceptions will be re-thrown.

Definition at line 167 of file CAbstractNavigator.h.

◆ enableTimeLog()

void mrpt::nav::CAbstractPTGBasedReactive::enableTimeLog ( bool  enable = true)
inline

Enables/disables the detailed time logger (default:disabled upon construction) When enabled, a report will be dumped to std::cout upon destruction.

See also
getTimeLogger

Definition at line 186 of file CAbstractPTGBasedReactive.h.

◆ generate_vel_cmd()

double CAbstractPTGBasedReactive::generate_vel_cmd ( const TCandidateMovementPTG in_movement,
mrpt::kinematics::CVehicleVelCmdPtr &  new_vel_cmd 
)
protectedvirtual

◆ getCurrentRobotSpeedLimits()

const mrpt::kinematics::CVehicleVelCmd::TVelCmdParams& mrpt::nav::CAbstractPTGBasedReactive::getCurrentRobotSpeedLimits ( ) const
inline

Get the current, global (honored for all PTGs) robot speed limits.

Definition at line 198 of file CAbstractPTGBasedReactive.h.

References mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::robot_absolute_speed_limits.

◆ getCurrentState()

TState mrpt::nav::CAbstractNavigator::getCurrentState ( ) const
inlineinherited

Returns the current navigator state.

Definition at line 128 of file CAbstractNavigator.h.

◆ getDelaysTimeLogger()

const mrpt::utils::CTimeLogger& mrpt::nav::CAbstractNavigator::getDelaysTimeLogger ( ) const
inlineinherited

Gives access to a const-ref to the internal time logger used to estimate delays.

See also
getTimeLogger() in derived classes

Definition at line 190 of file CAbstractNavigator.h.

◆ getErrorReason()

const TErrorReason& mrpt::nav::CAbstractNavigator::getErrorReason ( ) const
inlineinherited

In case of state=NAV_ERROR, this returns the reason for the error.

Error state is reseted everytime a new navigation starts with a call to navigate(), or when resetNavError() is called.

Definition at line 150 of file CAbstractNavigator.h.

◆ getFrameTF()

const mrpt::poses::FrameTransformer<2>* mrpt::nav::CAbstractNavigator::getFrameTF ( ) const
inlineinherited

Get the current frame tf object (defaults to nullptr)

See also
setFrameTF

Definition at line 161 of file CAbstractNavigator.h.

◆ getHoloMethod()

CAbstractHolonomicReactiveMethod * CAbstractPTGBasedReactive::getHoloMethod ( int  idx)
protectedvirtual

◆ getLastLogRecord()

void CAbstractPTGBasedReactive::getLastLogRecord ( CLogFileRecord o)

Provides a copy of the last log record with information about execution.

Parameters
oAn object where the log will be stored into.
Note
Log records are not prepared unless either "enableLogFile" is enabled in the constructor or "enableLogFile()" has been called.

Definition at line 191 of file CAbstractPTGBasedReactive.cpp.

References lastLogRecord, and m_critZoneLastLog.

◆ getLogFileDirectory()

std::string mrpt::nav::CAbstractPTGBasedReactive::getLogFileDirectory ( ) const
inline

Definition at line 133 of file CAbstractPTGBasedReactive.h.

◆ getPTG() [1/2]

virtual CParameterizedTrajectoryGenerator* mrpt::nav::CAbstractPTGBasedReactive::getPTG ( size_t  i)
pure virtual

◆ getPTG() [2/2]

virtual const CParameterizedTrajectoryGenerator* mrpt::nav::CAbstractPTGBasedReactive::getPTG ( size_t  i) const
pure virtual

◆ getPTG_count()

virtual size_t mrpt::nav::CAbstractPTGBasedReactive::getPTG_count ( ) const
pure virtual

◆ getTargetApproachSlowDownDistance()

double CAbstractPTGBasedReactive::getTargetApproachSlowDownDistance ( ) const

Returns this parameter for the first inner holonomic navigator instances [m] (should be the same in all of them?)

Definition at line 1716 of file CAbstractPTGBasedReactive.cpp.

References ASSERT_, and m_holonomicMethod.

◆ getTimeLogger()

const mrpt::utils::CTimeLogger& mrpt::nav::CAbstractPTGBasedReactive::getTimeLogger ( ) const
inline

Gives access to a const-ref to the internal time logger.

See also
enableTimeLog

Definition at line 191 of file CAbstractPTGBasedReactive.h.

◆ getWaypointNavStatus() [1/2]

void CWaypointsNavigator::getWaypointNavStatus ( TWaypointStatusSequence out_nav_status) const
virtualinherited

Get a copy of the control structure which describes the progress status of the waypoint navigation.

Definition at line 90 of file CWaypointsNavigator.cpp.

References mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status.

◆ getWaypointNavStatus() [2/2]

TWaypointStatusSequence mrpt::nav::CWaypointsNavigator::getWaypointNavStatus ( ) const
inlineinherited

Get a copy of the control structure which describes the progress status of the waypoint navigation.

Definition at line 69 of file CWaypointsNavigator.h.

Referenced by mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

◆ impl_waypoint_is_reachable()

bool CAbstractPTGBasedReactive::impl_waypoint_is_reachable ( const mrpt::math::TPoint2D wp_local_wrt_robot) const
protectedvirtual

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 1253 of file CAbstractPTGBasedReactive.cpp.

References ASSERT_, mrpt::nav::CParameterizedTrajectoryGenerator::getPathCount(), getPTG(), getPTG_count(), INVALID_TIMESTAMP, mrpt::nav::CParameterizedTrajectoryGenerator::inverseMap_WS2TP(), m_infoPerPTG, m_infoPerPTG_timestamp, MRPT_END, MRPT_START, mrpt::system::now(), mrpt::system::timeDifference(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.

◆ implementSenseObstacles()

virtual bool mrpt::nav::CAbstractPTGBasedReactive::implementSenseObstacles ( mrpt::system::TTimeStamp obs_timestamp)
protectedpure virtual

Return false on any fatal error.

Implemented in mrpt::nav::CReactiveNavigationSystem3D, and mrpt::nav::CReactiveNavigationSystem.

Referenced by STEP2_SenseObstacles().

◆ initialize()

void CAbstractPTGBasedReactive::initialize ( void  )
virtual

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 112 of file CAbstractPTGBasedReactive.cpp.

References ASSERT_, INVALID_TIMESTAMP, m_infoPerPTG_timestamp, m_multiobjopt, mrpt::nav::CAbstractNavigator::m_nav_cs, and STEP1_InitPTGs().

◆ isRelativePointReachable()

bool CWaypointsNavigator::isRelativePointReachable ( const mrpt::math::TPoint2D wp_local_wrt_robot) const
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 408 of file CWaypointsNavigator.cpp.

References mrpt::nav::CWaypointsNavigator::impl_waypoint_is_reachable().

◆ isRethrowNavExceptionsEnabled()

bool mrpt::nav::CAbstractNavigator::isRethrowNavExceptionsEnabled ( ) const
inlineinherited

Definition at line 170 of file CAbstractNavigator.h.

◆ loadConfigFile()

void CAbstractPTGBasedReactive::loadConfigFile ( const mrpt::utils::CConfigFileBase c)
virtual

◆ loggingGetWSObstaclesAndShape()

virtual void mrpt::nav::CAbstractPTGBasedReactive::loggingGetWSObstaclesAndShape ( CLogFileRecord out_log)
protectedpure virtual

Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the current timestep.

Implemented in mrpt::nav::CReactiveNavigationSystem3D, and mrpt::nav::CReactiveNavigationSystem.

Referenced by STEP8_GenerateLogRecord().

◆ navigate()

void CAbstractNavigator::navigate ( const TNavigationParams params)
virtualinherited

Navigation request to a single target location.

It starts a new navigation.

Parameters
[in]paramsPointer to structure with navigation info (its contents will be copied, so the original can be freely destroyed upon return if it was dynamically allocated.)
Note
A pointer is used so the passed object can be polymorphic with derived types.

Reimplemented in mrpt::nav::CNavigatorManualSequence.

Definition at line 346 of file CAbstractNavigator.cpp.

References MRPT_END, MRPT_START, mrpt::nav::CAbstractNavigator::onNavigateCommandReceived(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().

◆ navigateWaypoints()

void CWaypointsNavigator::navigateWaypoints ( const TWaypointSequence nav_request)
virtualinherited

◆ navigationStep()

void CWaypointsNavigator::navigationStep ( )
virtualinherited

◆ onNavigateCommandReceived()

void CWaypointsNavigator::onNavigateCommandReceived ( )
protectedvirtualinherited

◆ onStartNewNavigation()

void CAbstractPTGBasedReactive::onStartNewNavigation ( )
protectedvirtual

◆ performNavigationStep()

void CAbstractPTGBasedReactive::performNavigationStep ( )
protectedvirtual

The main method for the navigator.

< Allow PTGs to be responsive to target location, dynamics, etc.

Implements mrpt::nav::CAbstractNavigator.

Definition at line 244 of file CAbstractPTGBasedReactive.cpp.

References mrpt::nav::CLogFileRecord::additional_debug_msgs, mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), ASSERT_, ASSERT_EQUAL_, mrpt::math::TPose2D::asString(), build_movement_candidate(), mrpt::nav::CAbstractNavigator::changeSpeeds(), mrpt::nav::CAbstractNavigator::changeSpeedsNOP(), mrpt::nav::CAbstractNavigator::TNavigationParams::clone(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::colfreedist_move_k, mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::curVelLocal, mrpt::mrpt::utils::delete_safe(), mrpt::nav::TCandidateMovementPTG::direction, mrpt::nav::CAbstractNavigator::doEmergencyStop(), mrpt::nav::CAbstractNavigator::TPendingEvent::event_noargs, executionTime, mrpt::math::LowPassFilter_IIR1::filter(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::final_evaluation, mrpt::mrpt::format(), generate_vel_cmd(), mrpt::nav::CRobot2NavInterface::getEmergencyStopCmd(), getHoloMethod(), mrpt::math::LowPassFilter_IIR1::getLastOutput(), mrpt::utils::CTimeLogger::getLastTime(), getPTG(), getPTG_count(), mrpt::nav::CLogFileRecord::infoPerPTG, mrpt::poses::CPoseInterpolatorBase< DIM >::interpolate(), mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::isValid(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::log_entries, mrpt::poses::FrameTransformer< DIM >::lookupTransform(), m_closing_navigator, m_copy_prev_navParams, mrpt::nav::CAbstractNavigator::m_curPoseVel, m_enableConsoleOutput, m_enableKeepLogRecords, mrpt::nav::CAbstractNavigator::m_frame_tf, m_holonomicMethod, m_infoPerPTG, m_infoPerPTG_timestamp, m_init_done, m_lastSentVelCmd, mrpt::nav::CAbstractNavigator::m_latestOdomPoses, mrpt::nav::CAbstractNavigator::m_latestPoses, m_logFile, m_multiobjopt, mrpt::nav::CAbstractNavigator::m_navigationParams, mrpt::nav::CAbstractNavigator::m_navProfiler, mrpt::nav::CAbstractNavigator::m_pending_events, m_prev_logfile, mrpt::nav::CAbstractNavigator::m_robot, m_timelogger, mrpt::nav::CAbstractNavigator::m_timlog_delays, m_WS_Obstacles_timestamp, mrpt::nav::CParameterizedTrajectoryGenerator::maxTimeInVelCmdNOP(), meanExecutionPeriod, meanExecutionTime, 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, 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::utils::CStream::ReadObject(), mrpt::nav::CLogFileRecord::relPoseSense, mrpt::nav::CLogFileRecord::relPoseVelCmd, mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::relTarget, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::reset(), mrpt::utils::CMemoryStream::Seek(), mrpt::nav::CRobot2NavInterface::sendApparentCollisionEvent(), mrpt::nav::TCandidateMovementPTG::speed, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::speed_scale, STEP1_InitPTGs(), STEP2_SenseObstacles(), STEP8_GenerateLogRecord(), mrpt::nav::CAbstractNavigator::stop(), mrpt::nav::CParameterizedTrajectoryGenerator::supportSpeedAtTarget(), mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP(), mrpt::utils::CTicTac::Tac(), mrpt::nav::CAbstractNavigator::TNavigationParams::target, mrpt::nav::CAbstractNavigator::TargetInfo::targetDesiredRelSpeed, mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::targetRelSpeed, THROW_EXCEPTION, THROW_EXCEPTION_FMT, mrpt::utils::CTicTac::Tic(), tim_changeSpeed_avr, mrpt::nav::CAbstractPTGBasedReactive::TSentVelCmd::tim_send_cmd_vel, mrpt::system::timeDifference(), timerForExecutionPeriod, mrpt::nav::CAbstractNavigator::TRobotPoseVel::timestamp, mrpt::system::timestampAdd(), mrpt::nav::CLogFileRecord::timestamps, timoff_curPoseAndSpeed_avr, timoff_obstacles_avr, timoff_sendVelCmd_avr, 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.

◆ performNavigationStepNavigating()

void CAbstractNavigator::performNavigationStepNavigating ( bool  call_virtual_nav_method = true)
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 472 of file CAbstractNavigator.cpp.

References mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams::alarm_seems_not_approaching_target_timeout, 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::nav::CAbstractNavigator::ERR_CANNOT_REACH_TARGET, mrpt::nav::CAbstractNavigator::ERR_NONE, mrpt::nav::CAbstractNavigator::ERR_OTHER, mrpt::nav::CAbstractNavigator::TErrorReason::error_code, mrpt::nav::CAbstractNavigator::TErrorReason::error_msg, mrpt::nav::CAbstractNavigator::TPendingEvent::event_cannot_get_closer_target, mrpt::nav::CAbstractNavigator::TPendingEvent::event_noargs, mrpt::mrpt::format(), mrpt::nav::CAbstractNavigator::TNavigationParams::getAsText(), mrpt::system::getCurrentTime(), mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams::hysteresis_check_target_is_blocked, mrpt::nav::CAbstractNavigator::IDLE, mrpt::nav::CAbstractNavigator::internal_onStartNewNavigation(), 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_navErrorReason, 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_rethrow_exceptions, 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::nav::CAbstractNavigator::TNavigationParams::target, mrpt::nav::CAbstractNavigator::TargetInfo::target_coords, mrpt::nav::CAbstractNavigator::TargetInfo::targetIsIntermediaryWaypoint, mrpt::system::timeDifference(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), mrpt::math::TPose2D::x, and mrpt::math::TPose2D::y.

Referenced by mrpt::nav::CAbstractNavigator::navigationStep(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

◆ preDestructor()

void CAbstractPTGBasedReactive::preDestructor ( )
protected

◆ processNavigateCommand()

void CAbstractNavigator::processNavigateCommand ( const TNavigationParams params)
protectedvirtualinherited

◆ resetNavError()

void CAbstractNavigator::resetNavError ( )
virtualinherited

◆ resume()

void CAbstractNavigator::resume ( )
virtualinherited

◆ saveConfigFile()

void CAbstractPTGBasedReactive::saveConfigFile ( mrpt::utils::CConfigFileBase c) const
virtual

◆ setFrameTF()

void CAbstractNavigator::setFrameTF ( mrpt::poses::FrameTransformer< 2 > *  frame_tf)
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").

Ownership of the pointee object remains belonging to the user, which is responsible of deleting it and ensuring its a valid pointer during the lifetime of this navigator object.

Todo:
[MRPT 2.0: Make this a weak_ptr]

Definition at line 168 of file CAbstractNavigator.cpp.

References mrpt::nav::CAbstractNavigator::m_frame_tf.

◆ setHolonomicMethod() [1/2]

void CAbstractPTGBasedReactive::setHolonomicMethod ( const std::string method,
const mrpt::utils::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.

Available methods: class names of those derived from CAbstractHolonomicReactiveMethod

Definition at line 218 of file CAbstractPTGBasedReactive.cpp.

References ASSERT_, mrpt::nav::CAbstractHolonomicReactiveMethod::Create(), deleteHolonomicObjects(), getPTG(), getPTG_count(), m_holonomicMethod, mrpt::nav::CAbstractNavigator::m_nav_cs, and THROW_EXCEPTION_FMT.

Referenced by loadConfigFile(), and setHolonomicMethod().

◆ setHolonomicMethod() [2/2]

void CAbstractPTGBasedReactive::setHolonomicMethod ( THolonomicMethod  method,
const mrpt::utils::CConfigFileBase cfgBase 
)

◆ setLogFileDirectory()

void mrpt::nav::CAbstractPTGBasedReactive::setLogFileDirectory ( const std::string sDir)
inline

Changes the prefix for new log files.

Definition at line 132 of file CAbstractPTGBasedReactive.h.

◆ setTargetApproachSlowDownDistance()

void CAbstractPTGBasedReactive::setTargetApproachSlowDownDistance ( const double  dist)

Changes this parameter in all inner holonomic navigator instances [m].

Definition at line 1709 of file CAbstractPTGBasedReactive.cpp.

References m_holonomicMethod.

◆ STEP1_InitPTGs()

virtual void mrpt::nav::CAbstractPTGBasedReactive::STEP1_InitPTGs ( )
protectedpure virtual

◆ STEP2_SenseObstacles()

bool CAbstractPTGBasedReactive::STEP2_SenseObstacles ( )
protected

◆ STEP3_WSpaceToTPSpace()

virtual void mrpt::nav::CAbstractPTGBasedReactive::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 
)
protectedpure virtual

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.

Implemented in mrpt::nav::CReactiveNavigationSystem3D, and mrpt::nav::CReactiveNavigationSystem.

Referenced by build_movement_candidate().

◆ STEP8_GenerateLogRecord()

void CAbstractPTGBasedReactive::STEP8_GenerateLogRecord ( CLogFileRecord newLogRec,
const std::vector< mrpt::math::TPose2D > &  relTargets,
int  nSelectedPTG,
const mrpt::kinematics::CVehicleVelCmdPtr &  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 
)
protected

Definition at line 832 of file CAbstractPTGBasedReactive.cpp.

References mrpt::nav::CLogFileRecord::cmd_vel, mrpt::nav::CLogFileRecord_VFF::Create(), mrpt::nav::CLogFileRecord::cur_vel, mrpt::nav::CLogFileRecord::cur_vel_local, mrpt::utils::CTimeLogger::enter(), mrpt::math::LowPassFilter_IIR1::getLastOutput(), mrpt::utils::CTimeLogger::getLastTime(), mrpt::nav::CLogFileRecord::TInfoPerPTG::HLFR, mrpt::nav::CLogFileRecord::infoPerPTG, lastLogRecord, mrpt::utils::CTimeLogger::leave(), loggingGetWSObstaclesAndShape(), m_critZoneLastLog, mrpt::nav::CAbstractNavigator::m_curPoseVel, m_lastSentVelCmd, m_logFile, mrpt::nav::CAbstractNavigator::m_navProfiler, m_timelogger, mrpt::nav::CAbstractNavigator::m_timlog_delays, meanExecutionPeriod, 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, 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 performNavigationStep().

◆ stop()

bool CAbstractNavigator::stop ( bool  isEmergencyStop)
protectedvirtualinherited

◆ suspend()

void CAbstractNavigator::suspend ( )
virtualinherited

◆ updateCurrentPoseAndSpeeds()

void CAbstractNavigator::updateCurrentPoseAndSpeeds ( )
protectedvirtualinherited

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 354 of file CAbstractNavigator.cpp.

References mrpt::poses::CPoseInterpolatorBase< DIM >::begin(), mrpt::poses::CPoseInterpolatorBase< DIM >::clear(), mrpt::poses::CPoseInterpolatorBase< DIM >::erase(), mrpt::nav::CAbstractNavigator::ERR_EMERGENCY_STOP, mrpt::nav::CAbstractNavigator::TErrorReason::error_code, mrpt::nav::CAbstractNavigator::TErrorReason::error_msg, 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_navErrorReason, mrpt::nav::CAbstractNavigator::m_navigationState, mrpt::nav::CAbstractNavigator::m_navProfiler, mrpt::nav::CAbstractNavigator::m_robot, 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().

◆ waypoints_isAligning()

bool mrpt::nav::CWaypointsNavigator::waypoints_isAligning ( ) const
inlineprotectedinherited

Definition at line 113 of file CWaypointsNavigator.h.

◆ waypoints_navigationStep()

void CWaypointsNavigator::waypoints_navigationStep ( )
protectedvirtualinherited

The waypoints-specific part of navigationStep()

Definition at line 105 of file CWaypointsNavigator.cpp.

References mrpt::nav::TWaypoint::allowed_distance, mrpt::math::angDistance(), ASSERT_, mrpt::nav::CAbstractNavigator::changeSpeeds(), mrpt::math::TSegment2D::distance(), mrpt::nav::CAbstractNavigator::TPendingEvent::event_new_wp, mrpt::nav::CAbstractNavigator::TPendingEvent::event_new_wp_index, mrpt::nav::CAbstractNavigator::TPendingEvent::event_wp_reached, mrpt::nav::CAbstractNavigator::TPendingEvent::event_wp_reached_index, mrpt::nav::CAbstractNavigator::TPendingEvent::event_wp_reached_reached, 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::mrpt::utils::RAD2DEG(), mrpt::nav::TWaypoint::speed_ratio, mrpt::mrpt::math::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::CWaypointsNavigator::TWaypointsNavigatorParams::waypoint_angle_tolerance, 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().

Member Data Documentation

◆ executionTime

mrpt::utils::CTicTac mrpt::nav::CAbstractPTGBasedReactive::executionTime
protected

Definition at line 232 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ lastLogRecord

CLogFileRecord mrpt::nav::CAbstractPTGBasedReactive::lastLogRecord
protected

The last log.

Definition at line 218 of file CAbstractPTGBasedReactive.h.

Referenced by getLastLogRecord(), and STEP8_GenerateLogRecord().

◆ m_badNavAlarm_lastMinDistTime

mrpt::system::TTimeStamp mrpt::nav::CAbstractNavigator::m_badNavAlarm_lastMinDistTime
protectedinherited

◆ m_badNavAlarm_minDistTarget

double mrpt::nav::CAbstractNavigator::m_badNavAlarm_minDistTarget
protectedinherited

For sending an alarm (error event) when it seems that we are not approaching toward the target in a while...

Definition at line 298 of file CAbstractNavigator.h.

Referenced by mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CAbstractNavigator::processNavigateCommand().

◆ m_closing_navigator

bool mrpt::nav::CAbstractPTGBasedReactive::m_closing_navigator
protected

Signal that the destructor has been called, so no more calls are accepted from other threads.

Definition at line 287 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep(), and preDestructor().

◆ m_copy_prev_navParams

TNavigationParams* mrpt::nav::CAbstractPTGBasedReactive::m_copy_prev_navParams
private

A copy of last-iteration navparams, used to detect changes.

Definition at line 344 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep(), and ~CAbstractPTGBasedReactive().

◆ m_critZoneLastLog

mrpt::synch::CCriticalSectionRecursive mrpt::nav::CAbstractPTGBasedReactive::m_critZoneLastLog
protected

Critical zones.

Definition at line 221 of file CAbstractPTGBasedReactive.h.

Referenced by getLastLogRecord(), and STEP8_GenerateLogRecord().

◆ m_curPoseVel

TRobotPoseVel mrpt::nav::CAbstractNavigator::m_curPoseVel
protectedinherited

◆ m_enableConsoleOutput

bool mrpt::nav::CAbstractPTGBasedReactive::m_enableConsoleOutput
protected

◆ m_enableKeepLogRecords

bool mrpt::nav::CAbstractPTGBasedReactive::m_enableKeepLogRecords
protected

See enableKeepLogRecords.

Definition at line 217 of file CAbstractPTGBasedReactive.h.

Referenced by build_movement_candidate(), and performNavigationStep().

◆ m_expr_var_k

double mrpt::nav::CAbstractPTGBasedReactive::m_expr_var_k
private

Definition at line 343 of file CAbstractPTGBasedReactive.h.

◆ m_expr_var_k_target

double mrpt::nav::CAbstractPTGBasedReactive::m_expr_var_k_target
private

Definition at line 343 of file CAbstractPTGBasedReactive.h.

◆ m_expr_var_num_paths

double mrpt::nav::CAbstractPTGBasedReactive::m_expr_var_num_paths
private

Definition at line 343 of file CAbstractPTGBasedReactive.h.

◆ m_frame_tf

mrpt::poses::FrameTransformer<2>* mrpt::nav::CAbstractNavigator::m_frame_tf
protectedinherited

Optional, user-provided frame transformer.

Note: We dont have ownership of the pointee object!

Definition at line 272 of file CAbstractNavigator.h.

Referenced by performNavigationStep(), and mrpt::nav::CAbstractNavigator::setFrameTF().

◆ m_holonomicMethod

std::vector<CAbstractHolonomicReactiveMethod*> mrpt::nav::CAbstractPTGBasedReactive::m_holonomicMethod
protected

◆ m_infoPerPTG

std::vector<TInfoPerPTG> mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG
protected

Temporary buffers for working with each PTG during a navigationStep()

Definition at line 302 of file CAbstractPTGBasedReactive.h.

Referenced by impl_waypoint_is_reachable(), and performNavigationStep().

◆ m_infoPerPTG_timestamp

mrpt::system::TTimeStamp mrpt::nav::CAbstractPTGBasedReactive::m_infoPerPTG_timestamp
protected

◆ m_init_done

bool mrpt::nav::CAbstractPTGBasedReactive::m_init_done
protected

Whether loadConfigFile() has been called or not.

Definition at line 224 of file CAbstractPTGBasedReactive.h.

Referenced by loadConfigFile(), and performNavigationStep().

◆ m_is_aligning

bool mrpt::nav::CWaypointsNavigator::m_is_aligning
protectedinherited

◆ m_last_alignment_cmd

mrpt::system::TTimeStamp mrpt::nav::CWaypointsNavigator::m_last_alignment_cmd
protectedinherited

◆ m_last_curPoseVelUpdate_pose_frame_id

std::string mrpt::nav::CAbstractNavigator::m_last_curPoseVelUpdate_pose_frame_id
protectedinherited

◆ m_last_curPoseVelUpdate_robot_time

double mrpt::nav::CAbstractNavigator::m_last_curPoseVelUpdate_robot_time
protectedinherited

◆ m_last_vel_cmd

mrpt::kinematics::CVehicleVelCmdPtr mrpt::nav::CAbstractPTGBasedReactive::m_last_vel_cmd
protected

Last velocity commands.

Definition at line 219 of file CAbstractPTGBasedReactive.h.

Referenced by calc_move_candidate_scores(), and generate_vel_cmd().

◆ m_lastSentVelCmd

TSentVelCmd mrpt::nav::CAbstractPTGBasedReactive::m_lastSentVelCmd
protected

◆ m_latestOdomPoses

mrpt::poses::CPose2DInterpolator mrpt::nav::CAbstractNavigator::m_latestOdomPoses
protectedinherited

◆ m_latestPoses

mrpt::poses::CPose2DInterpolator mrpt::nav::CAbstractNavigator::m_latestPoses
protectedinherited

◆ m_logFile

mrpt::utils::CStream* mrpt::nav::CAbstractPTGBasedReactive::m_logFile
protected

◆ m_multiobjopt

mrpt::nav::CMultiObjectiveMotionOptimizerBasePtr mrpt::nav::CAbstractPTGBasedReactive::m_multiobjopt
protected

◆ m_nav_cs

mrpt::synch::CCriticalSectionRecursive mrpt::nav::CAbstractNavigator::m_nav_cs
protectedinherited

◆ m_nav_waypoints_cs

mrpt::synch::CCriticalSectionRecursive mrpt::nav::CWaypointsNavigator::m_nav_waypoints_cs
protectedinherited

◆ m_navigationParams

TNavigationParams* mrpt::nav::CAbstractNavigator::m_navigationParams
protectedinherited

◆ m_navigationState

TState mrpt::nav::CAbstractNavigator::m_navigationState
protectedinherited

◆ m_navlogfiles_dir

std::string mrpt::nav::CAbstractPTGBasedReactive::m_navlogfiles_dir
private

Default: "./reactivenav.logs".

Definition at line 341 of file CAbstractPTGBasedReactive.h.

Referenced by enableLogFile().

◆ m_navProfiler

mrpt::utils::CTimeLogger mrpt::nav::CAbstractNavigator::m_navProfiler
protectedinherited

◆ m_pending_events

std::list<TPendingEvent> mrpt::nav::CAbstractNavigator::m_pending_events
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 222 of file CAbstractNavigator.h.

Referenced by mrpt::nav::CAbstractNavigator::dispatchPendingNavEvents(), mrpt::nav::CAbstractNavigator::navigationStep(), performNavigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

◆ m_prev_logfile

mrpt::utils::CStream * mrpt::nav::CAbstractPTGBasedReactive::m_prev_logfile
protected

The current log file stream, or NULL if not being used.

Definition at line 216 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ m_PTGsMustBeReInitialized

bool mrpt::nav::CAbstractPTGBasedReactive::m_PTGsMustBeReInitialized
protected

◆ m_robot

CRobot2NavInterface& mrpt::nav::CAbstractNavigator::m_robot
protectedinherited

◆ m_timelogger

mrpt::utils::CTimeLogger mrpt::nav::CAbstractPTGBasedReactive::m_timelogger
protected

◆ m_timlog_delays

mrpt::utils::CTimeLogger mrpt::nav::CAbstractNavigator::m_timlog_delays
protectedinherited

◆ m_was_aligning

bool mrpt::nav::CWaypointsNavigator::m_was_aligning
protectedinherited

Whether the last timestep was "is_aligning" in a waypoint with heading.

Definition at line 115 of file CWaypointsNavigator.h.

Referenced by mrpt::nav::CWaypointsNavigator::onNavigateCommandReceived(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

◆ m_waypoint_nav_status

TWaypointStatusSequence mrpt::nav::CWaypointsNavigator::m_waypoint_nav_status
protectedinherited

◆ m_WS_filter

mrpt::maps::CPointCloudFilterBasePtr mrpt::nav::CAbstractPTGBasedReactive::m_WS_filter
protected

◆ m_WS_Obstacles_timestamp

mrpt::system::TTimeStamp mrpt::nav::CAbstractPTGBasedReactive::m_WS_Obstacles_timestamp
protected

Definition at line 289 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep(), and STEP2_SenseObstacles().

◆ meanExecutionPeriod

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::meanExecutionPeriod
protected

Runtime estimation of execution period of the method.

Definition at line 235 of file CAbstractPTGBasedReactive.h.

Referenced by generate_vel_cmd(), performNavigationStep(), and STEP8_GenerateLogRecord().

◆ meanExecutionTime

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::meanExecutionTime
protected

Definition at line 233 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep(), and STEP8_GenerateLogRecord().

◆ meanTotalExecutionTime

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::meanTotalExecutionTime
protected

Definition at line 234 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ params_abstract_navigator

TAbstractNavigatorParams mrpt::nav::CAbstractNavigator::params_abstract_navigator
inherited

◆ params_abstract_ptg_navigator

TAbstractPTGNavigatorParams mrpt::nav::CAbstractPTGBasedReactive::params_abstract_ptg_navigator

◆ params_waypoints_navigator

TWaypointsNavigatorParams mrpt::nav::CWaypointsNavigator::params_waypoints_navigator
inherited

◆ tictac

mrpt::utils::CTicTac mrpt::nav::CAbstractPTGBasedReactive::tictac
protected

Definition at line 232 of file CAbstractPTGBasedReactive.h.

Referenced by build_movement_candidate().

◆ tim_changeSpeed_avr

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::tim_changeSpeed_avr
protected

Definition at line 236 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep(), and STEP8_GenerateLogRecord().

◆ timerForExecutionPeriod

mrpt::utils::CTicTac mrpt::nav::CAbstractPTGBasedReactive::timerForExecutionPeriod
protected

Definition at line 225 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ timoff_curPoseAndSpeed_avr

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::timoff_curPoseAndSpeed_avr
protected

Definition at line 236 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ timoff_obstacles_avr

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::timoff_obstacles_avr
protected

Definition at line 236 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ timoff_sendVelCmd_avr

mrpt::math::LowPassFilter_IIR1 mrpt::nav::CAbstractPTGBasedReactive::timoff_sendVelCmd_avr
protected

Definition at line 236 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().

◆ totalExecutionTime

mrpt::utils::CTicTac mrpt::nav::CAbstractPTGBasedReactive::totalExecutionTime
protected

Definition at line 232 of file CAbstractPTGBasedReactive.h.

Referenced by performNavigationStep().




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020