6#ifndef YARP_DEV_INAVIGATION2D_H
7#define YARP_DEV_INAVIGATION2D_H
22class INavigation2DVelocityActions;
23class INavigation2DTargetActions;
24class INavigation2DControlActions;
25class INavigation2DExtraActions;
54namespace INavigation2DHelpers
167 virtual bool suspendNavigation(
const double time_s= std::numeric_limits<double>::infinity()) = 0;
246 virtual bool checkNearToLocation(std::string location_name,
double linear_tolerance,
double angular_tolerance = std::numeric_limits<double>::infinity()) = 0;
constexpr yarp::conf::vocab32_t VOCAB_NAV_RESUME
constexpr yarp::conf::vocab32_t VOCAB_NAV_GET_CURRENT_WAYPOINT
constexpr yarp::conf::vocab32_t VOCAB_NAV_GET_NAVIGATION_WAYPOINTS
constexpr yarp::conf::vocab32_t VOCAB_NAV_GET_NAV_MAP
constexpr yarp::conf::vocab32_t VOCAB_NAV_STOP
constexpr yarp::conf::vocab32_t VOCAB_NAV_SUSPEND
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
contains the definition of a Map2DPath type
contains the definition of a map type
ILocalization2D interface.
virtual bool recomputeCurrentNavigationPath()=0
Forces the navigation system to recompute the path from the current robot position to the current goa...
virtual bool getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints)=0
Returns the list of waypoints generated by the navigation algorithm.
virtual bool getCurrentNavigationWaypoint(yarp::dev::Nav2D::Map2DLocation &curr_waypoint)=0
Returns the current waypoint pursued by the navigation algorithm.
virtual bool resumeNavigation()=0
Resume a previously suspended navigation task.
virtual bool getNavigationStatus(NavigationStatusEnum &status)=0
Gets the current status of the navigation task.
virtual bool stopNavigation()=0
Terminates the current navigation task.
virtual ~INavigation2DControlActions()
Destructor.
virtual bool suspendNavigation(const double time_s=std::numeric_limits< double >::infinity())=0
Ask to the robot to suspend the current navigation task for a defined amount of time.
virtual bool getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map)=0
Returns the current navigation map processed by the navigation algorithm.
virtual bool gotoTargetByRelativeLocation(double x, double y)=0
Ask the robot to reach a position defined in the robot reference frame.
virtual bool gotoTargetByAbsoluteLocation(yarp::dev::Nav2D::Map2DLocation loc)=0
Ask the robot to reach a position defined in the world reference frame.
virtual ~INavigation2DTargetActions()
Destructor.
virtual bool getAbsoluteLocationOfCurrentTarget(yarp::dev::Nav2D::Map2DLocation &loc)=0
Gets the last navigation target in the world reference frame.
virtual bool gotoTargetByRelativeLocation(double x, double y, double theta)=0
Ask the robot to reach a position defined in the robot reference frame.
virtual bool getRelativeLocationOfCurrentTarget(double &x, double &y, double &theta)=0
Gets the last navigation target in the robot reference frame.
virtual bool applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1)=0
Apply a velocity command.
virtual ~INavigation2DVelocityActions()
Destructor.
virtual bool getLastVelocityCommand(double &x_vel, double &y_vel, double &theta_vel)=0
Returns the last applied velocity command.
An interface to control the navigation of a mobile robot in a 2D environment.
virtual ~INavigation2D()
Destructor.
std::string statusToString(NavigationStatusEnum status)
NavigationStatusEnum stringToStatus(std::string s)
@ navigation_status_error
@ navigation_status_preparing_before_move
@ navigation_status_aborted
@ navigation_status_failing
@ navigation_status_goal_reached
@ navigation_status_thinking
@ navigation_status_moving
@ navigation_status_paused
@ navigation_status_waiting_obstacle
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
The main, catch-all namespace for YARP.