104 virtual void initialize() = 0;
105 virtual void navigationStep();
111 virtual void navigate(
const TNavigationParams *
params );
113 virtual void cancel();
114 virtual void resume();
115 virtual void suspend();
116 virtual void resetNavError();
165 void internal_onStartNewNavigation();
189 void dispatchPendingNavEvents();
192 virtual void performNavigationStep( )=0;
195 virtual void onStartNewNavigation() = 0;
198 virtual void onNavigateCommandReceived();
205 void updateCurrentPoseAndSpeeds();
211 virtual void performNavigationStepNavigating(
bool call_virtual_nav_method =
true);
217 virtual bool changeSpeedsNOP();
218 virtual bool stop(
bool isEmergencyStop);
223 virtual bool checkHasReachedTarget(
const double targetDist)
const;
228 virtual bool checkCollisionWithLatestObstacles(
const mrpt::math::TPose2D &relative_robot_pose)
const;
Recursive mutex: allow recursive locks by the owner thread.
double m_badNavAlarm_minDistTarget
For sending an alarm (error event) when it seems that we are not approaching toward the target in a w...
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
const mrpt::utils::CTimeLogger & getDelaysTimeLogger() const
Gives access to a const-ref to the internal time logger used to estimate delays.
TRobotPoseVel m_curPoseVel
Current robot pose (updated in CAbstractNavigator::navigationStep() )
bool event_cannot_get_closer_target
This class stores a time-stamped trajectory in SE(2) (mrpt::math::TPose2D poses). ...
mrpt::poses::FrameTransformer< 2 > * m_frame_tf
Optional, user-provided frame transformer.
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
int event_wp_reached_index
TNavigationParams * m_navigationParams
Current navigation parameters.
Base for all high-level navigation commands.
float targetAllowedDistance
(Default=0.5 meters) Allowed distance to target in order to end the navigation.
Only specializations of this class are defined for each enum type of interest.
functor_event_void_t event_noargs
event w/o arguments
bool targetIsRelative
(Default=false) Whether the target coordinates are in global coordinates (false) or are relative to t...
double dist_check_target_is_blocked
(Default value=0.6) When closer than this distance, check if the target is blocked to abort navigatio...
std::string pose_frame_id
map frame ID for pose
mrpt::utils::CTimeLogger m_timlog_delays
Time logger to collect delay-related stats.
This class allows loading and storing values and vectors of different types from a configuration text...
TState m_navigationState
Current internal state of navigator:
mrpt::nav::CAbstractNavigator::TState enum_t
Virtual base for velocity commands of different kinematic models of planar mobile robot...
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
bool NAV_IMPEXP operator==(const CAbstractNavigator::TNavigationParamsBase &, const CAbstractNavigator::TNavigationParamsBase &)
The struct for configuring navigation requests.
TState
The different states for the navigation system.
double dist_to_target_for_sending_event
Default value=0, means use the "targetAllowedDistance" passed by the user in the navigation request...
double targetDesiredRelSpeed
(Default=.05) Desired relative speed (wrt maximum speed), in range [0,1], of the vehicle at target...
TState getCurrentState() const
Returns the current navigator state.
std::string target_frame_id
(Default="map") Frame ID in which target is given. Optional, use only for submapping applications...
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
mrpt::system::TTimeStamp timestamp
Individual target info in CAbstractNavigator::TNavigationParamsBase and derived classes.
bool event_wp_reached_reached
GLsizei const GLchar ** string
mrpt::math::TPose2D target_coords
Coordinates of desired target location. Heading may be ignored by some reactive implementations.
TState m_lastNavigationState
Last internal state of navigator:
double alarm_seems_not_approaching_target_timeout
navigator timeout (seconds) [Default=30 sec]
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TAbstractNavigatorParams params_abstract_navigator
virtual ~TNavigationParamsBase()
mrpt::math::TTwist2D velLocal
int m_counter_check_target_is_blocked
CRobot2NavInterface & m_robot
The navigator-robot interface.
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.
TargetInfo target
Navigation target.
double m_last_curPoseVelUpdate_robot_time
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
int hysteresis_check_target_is_blocked
std::string m_last_curPoseVelUpdate_pose_frame_id
mrpt::synch::CCriticalSectionRecursive m_nav_cs
mutex for all navigation methods
bool m_navigationEndEventSent
Will be false until the navigation end is sent, and it is reset with each new command.
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
mrpt::system::TTimeStamp m_badNavAlarm_lastMinDistTime
static void fill(bimap< enum_t, std::string > &m_map)
This is the base class for any reactive/planned navigation system.
GLenum const GLfloat * params
mrpt::poses::CPose2DInterpolator m_latestPoses
bool operator!=(const TargetInfo &o) const
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
mrpt::math::TPose2D rawOdometry
raw odometry (frame does not match to "pose", but is expected to be smoother in the short term)...
const mrpt::poses::FrameTransformer< 2 > * getFrameTF() const
Get the current frame tf object (defaults to nullptr)
std::vector< TPendingEvent > m_pending_events
Events generated during navigationStep(), enqueued to be called at the end of the method execution to...
bool targetIsIntermediaryWaypoint