9#ifndef CAbstractReactiveNavigationSystem_H
10#define CAbstractReactiveNavigationSystem_H
52 return changeSpeeds(0,0);
74 virtual void sendNavigationStartEvent () { std::cout <<
"[sendNavigationStartEvent] Not implemented by the user." << std::endl; }
75 virtual void sendNavigationEndEvent() { std::cout <<
"[sendNavigationEndEvent] Not implemented by the user." << std::endl; }
77 virtual void sendWaySeemsBlockedEvent() { std::cout <<
"[sendWaySeemsBlockedEvent] Not implemented by the user." << std::endl; }
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
This is the base class for any reactive navigation system.
TNavigationParams * m_navigationParams
Current navigation parameters.
virtual void suspend()
Suspend current navegation.
virtual ~CAbstractReactiveNavigationSystem()
Destructor.
TState getCurrentState() const
Returns the current navigator state.
CAbstractReactiveNavigationSystem(CReactiveInterfaceImplementation &react_iterf_impl)
Constructor.
void cancel()
Cancel current navegacion.
void resume()
Continues with suspended navigation.
TState m_lastNavigationState
Last internal state of navigator:
virtual void performNavigationStep()=0
To be implemented in derived classes.
virtual void navigate(const TNavigationParams *params)=0
Navigation request.
void navigationStep()
This method must be called periodically in order to effectively run the navigation.
TState m_navigationState
Current internal state of navigator:
TState
The different states for the navigation system.
CReactiveInterfaceImplementation & m_robot
The navigator-robot interface.
The pure virtual class that a user of CAbstractReactiveNavigationSystem-derived classes must implemen...
virtual bool changeSpeeds(float v, float w)=0
Change the instantaneous speeds of robot.
virtual bool getCurrentPoseAndSpeeds(mrpt::poses::CPose2D &curPose, float &curV, float &curW)=0
Get the current pose and speeds of the robot.
virtual void sendWaySeemsBlockedEvent()
virtual void sendNavigationEndEvent()
virtual bool startWatchdog(float T_ms)
Start the watchdog timer of the robot platform, if any.
virtual bool stop()
Stop the robot right now.
virtual bool senseObstacles(mrpt::maps::CSimplePointsMap &obstacles)=0
Return the current set of obstacle points, as seen from the local coordinate frame of the robot.
virtual void notifyHeadingDirection(const double heading_dir_angle)
virtual void sendNavigationStartEvent()
virtual bool stopWatchdog()
Stop the watchdog timer.
virtual void sendNavigationEndDueToErrorEvent()
A class used to store a 2D pose.
This base class provides a common printf-like method to send debug information to std::cout,...
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The struct for configuring navigation requests.
virtual std::string getAsText() const
Gets navigation params as a human-readable format.
float targetAllowedDistance
Allowed distance to target in order to end the navigation.
mrpt::math::TPoint2D target
Coordinates of desired target location.
bool targetIsRelative
(Default=false) Whether the target coordinates are in global coordinates (false) or are relative to t...
double targetHeading
Target location (heading, in radians).
virtual TNavigationParams * clone() const
TNavigationParams()
Ctor with default values.
virtual ~TNavigationParams()