6#ifndef YARP_DEV_NAVIGATION2D_NWC_YARP_H
7#define YARP_DEV_NAVIGATION2D_NWC_YARP_H
25#define DEFAULT_THREAD_PERIOD 20
61 bool close()
override;
72 bool checkNearToLocation(std::string location_name,
double linear_tolerance,
double angular_tolerance = std::numeric_limits<double>::infinity())
override;
93 bool applyVelocityCommand(
double x_vel,
double y_vel,
double theta_vel,
double timeout = 0.1)
override;
101 bool getEstimatedPoses(std::vector<yarp::dev::Nav2D::Map2DLocation>& poses)
override;
116 bool renameLocation(std::string original_name, std::string new_name)
override;
117 bool renameArea(std::string original_name, std::string new_name)
override;
118 bool renamePath(std::string original_name, std::string new_name)
override;
121 bool deleteArea(std::string location_name)
override;
122 bool deletePath(std::string path_name)
override;
125 bool getAreasList(std::vector<std::string>& locations)
override;
126 bool getPathsList(std::vector<std::string>& paths)
override;
128 bool getAllLocations(std::vector<yarp::dev::Nav2D::Map2DLocation>& locations)
override;
129 bool getAllAreas(std::vector<yarp::dev::Nav2D::Map2DArea>& areas)
override;
130 bool getAllPaths(std::vector<yarp::dev::Nav2D::Map2DPath>& paths)
override;
137 bool remove_map(std::string map_name)
override;
140 bool get_map_names(std::vector<std::string>& map_names)
override;
150 bool saveMapToDisk(std::string map_name, std::string file_name)
override;
define control board standard interfaces
contains the definition of a Map2DPath type
contains the definition of a Vector type
This class is the parameters parser for class Navigation2D_nwc_yarp.
navigation2D_nwc_yarp: A device which allows a client application to perform navigation tasks,...
yarp::os::Port m_rpc_port_user_commands
bool gotoTargetByRelativeLocation(double x, double y, double theta) override
Ask the robot to reach a position defined in the robot reference frame.
bool getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation &loc) override
Retrieves a location specified by the user in the world reference frame.
bool getPathsList(std::vector< std::string > &paths) override
Get a list of the names of all stored paths.
bool store_map(const yarp::dev::Nav2D::MapGrid2D &map) override
Stores a map into the map server.
bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) override
Store a path.
bool loadLocationsAndExtras(std::string locations_collection_file) override
Load a collection of locations/areas/paths etc from disk.
bool renameLocation(std::string original_name, std::string new_name) override
Searches for a location and renames it.
bool loadMapsCollection(std::string maps_collection_file) override
Load a collection of maps from disk.
bool enableMapsCompression(bool enable) override
99999999999
INavigation2DMsgs m_nav_RPC
bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path) override
Retrieves a path.
bool startLocalizationService() override
Starts the localization service.
bool remove_map(std::string map_name) override
Removes a map from the map server.
bool recomputeCurrentNavigationPath() override
Forces the navigation system to recompute the path from the current robot position to the current goa...
bool stopNavigation() override
Terminates the current navigation task.
bool getAbsoluteLocationOfCurrentTarget(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the last navigation target in the world reference frame.
bool getAllLocations(std::vector< yarp::dev::Nav2D::Map2DLocation > &locations) override
Get a list of all stored locations.
bool getLocationsList(std::vector< std::string > &locations) override
Get a list of the names of all stored locations.
bool getAreasList(std::vector< std::string > &locations) override
Get a list of the names of all stored areas.
bool gotoTargetByAbsoluteLocation(yarp::dev::Nav2D::Map2DLocation loc) override
Ask the robot to reach a position defined in the world reference frame.
bool parse_respond_string(const yarp::os::Bottle &command, yarp::os::Bottle &reply)
bool renameArea(std::string original_name, std::string new_name) override
Searches for an area and renames it.
bool storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) override
Store a location specified by the user in the world reference frame.
ILocalization2DMsgs m_loc_RPC
bool get_map_names(std::vector< std::string > &map_names) override
Gets a list containing the names of all registered maps.
bool clearAllPaths() override
Delete all stored paths.
bool deletePath(std::string path_name) override
Delete a path.
bool gotoTargetByLocationName(std::string location_name) override
Ask the robot to reach a previously stored location/area.
bool getAllAreas(std::vector< yarp::dev::Nav2D::Map2DArea > &areas) override
Get a list of all stored areas.
bool applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
Apply a velocity command.
yarp::os::Port m_rpc_port_to_localization_server
bool renamePath(std::string original_name, std::string new_name) override
Searches for a path and renames it.
bool checkInsideArea(yarp::dev::Nav2D::Map2DArea area) override
Check if the robot is currently inside the specified area.
bool saveLocationsAndExtras(std::string locations_collection_file) override
Save a collection of locations/area/paths etc to disk.
bool clearMapTemporaryFlags(std::string map_name) override
Clear all temporary flags from a specific map.
bool getAllPaths(std::vector< yarp::dev::Nav2D::Map2DPath > &paths) override
Get a list of all stored paths.
bool getNavigationStatus(yarp::dev::Nav2D::NavigationStatusEnum &status) override
Gets the current status of the navigation task.
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getCurrentNavigationWaypoint(yarp::dev::Nav2D::Map2DLocation &curr_waypoint) override
Returns the current waypoint pursued by the navigation algorithm.
bool resumeNavigation() override
Resume a previously suspended navigation task.
bool getNameOfCurrentTarget(std::string &location_name) override
Gets the name of the current target, if available (set by gotoTargetByLocationName)
bool deleteLocation(std::string location_name) override
Delete a location.
bool setInitialPose(const yarp::dev::Nav2D::Map2DLocation &loc) override
Sets the initial pose for the localization algorithm which estimates the current position of the robo...
bool saveMapsCollection(std::string maps_collection_file) override
Save a collection of maps to disk.
bool loadMapFromDisk(std::string file_name) override
Load a map from disk.
bool getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
bool getEstimatedOdometry(yarp::dev::OdometryData &odom) override
Gets the estimated odometry the robot, including its velocity expressed in the world and in the local...
bool deleteArea(std::string location_name) override
Delete an area.
bool suspendNavigation(const double time_s) override
Ask to the robot to suspend the current navigation task for a defined amount of time.
bool getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
virtual bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool saveMapToDisk(std::string map_name, std::string file_name) override
Save a map to disk.
bool storeArea(std::string location_name, yarp::dev::Nav2D::Map2DArea area) override
Store an area.
bool getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map) override
Returns the current navigation map processed by the navigation algorithm.
bool getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints) override
Returns the list of waypoints generated by the navigation algorithm.
bool storeCurrentPosition(std::string location_name) override
Store the current location of the robot.
bool checkNearToLocation(yarp::dev::Nav2D::Map2DLocation loc, double linear_tolerance, double angular_tolerance=std::numeric_limits< double >::infinity()) override
Check if the robot is currently near to the specified area.
bool getEstimatedPoses(std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
Gets a set of pose estimates computed by the localization algorithm.
yarp::os::Port m_rpc_port_to_Map2DServer
bool clearAllAreas() override
Delete all stored areas.
bool clearAllLocations() override
Delete all stored locations.
bool getLastVelocityCommand(double &x_vel, double &y_vel, double &theta_vel) override
Returns the last applied velocity command.
bool stopLocalizationService() override
Stops the localization service.
bool clearAllMapsTemporaryFlags() override
Clear all temporary flags from all stored maps.
bool getRelativeLocationOfCurrentTarget(double &x, double &y, double &theta) override
Gets the last navigation target in the robot reference frame.
bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map) override
Gets a map from the map server.
bool getArea(std::string location_name, yarp::dev::Nav2D::Map2DArea &area) override
Retrieves an area.
yarp::os::Port m_rpc_port_to_navigation_server
bool clearAllMaps() override
Removes all the registered maps from the server.
bool followPath(const yarp::dev::Nav2D::Map2DPath &locs) override
Ask the robot to navigate through a set of locations defined in the world reference frame.
Interface implemented by all device drivers.
An interface to control the navigation of a mobile robot in a 2D environment.
A simple collection of objects that can be described and transmitted in a portable way.
An interface for reading from a network connection.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
A mini-server for network communication.
A base class for nested structures that can be searched.