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;
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
yarp::dev::ReturnValue clearAllMaps() override
Removes all the registered maps from the server.
yarp::dev::ReturnValue loadMapFromDisk(std::string file_name) override
Load a map from disk.
yarp::dev::ReturnValue clearAllMapsTemporaryFlags() override
Clear all temporary flags from all stored maps.
yarp::dev::ReturnValue deleteLocation(std::string location_name) override
Delete a location.
yarp::dev::ReturnValue setInitialPose(const yarp::dev::Nav2D::Map2DLocation &loc) override
Sets the initial pose for the localization algorithm which estimates the current position of the robo...
yarp::dev::ReturnValue startLocalizationService() override
Starts the localization service.
yarp::dev::ReturnValue getAllPaths(std::vector< yarp::dev::Nav2D::Map2DPath > &paths) override
Get a list of all stored paths.
yarp::dev::ReturnValue getLastVelocityCommand(double &x_vel, double &y_vel, double &theta_vel) override
Returns the last applied velocity command.
yarp::dev::ReturnValue getCurrentNavigationWaypoint(yarp::dev::Nav2D::Map2DLocation &curr_waypoint) override
Returns the current waypoint pursued by the navigation algorithm.
yarp::dev::ReturnValue storeCurrentPosition(std::string location_name) override
Store the current location of the robot.
yarp::dev::ReturnValue getAreasList(std::vector< std::string > &locations) override
Get a list of the names of all stored areas.
yarp::dev::ReturnValue clearAllLocations() override
Delete all stored locations.
yarp::dev::ReturnValue getAllLocations(std::vector< yarp::dev::Nav2D::Map2DLocation > &locations) override
Get a list of all stored locations.
yarp::dev::ReturnValue enableMapsCompression(bool enable) override
Enable/disables maps compression over the network.
INavigation2DMsgs m_nav_RPC
yarp::dev::ReturnValue suspendNavigation(const double time_s) override
Ask to the robot to suspend the current navigation task for a defined amount of time.
yarp::dev::ReturnValue getPathsList(std::vector< std::string > &paths) override
Get a list of the names of all stored paths.
yarp::dev::ReturnValue storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) override
Store a location specified by the user in the world reference frame.
yarp::dev::ReturnValue loadLocationsAndExtras(std::string locations_collection_file) override
Load a collection of locations/areas/paths etc from disk.
yarp::dev::ReturnValue applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
Apply a velocity command.
yarp::dev::ReturnValue getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation &loc) override
Retrieves a location specified by the user in the world reference frame.
yarp::dev::ReturnValue loadMapsCollection(std::string maps_collection_file) override
Load a collection of maps from disk.
yarp::dev::ReturnValue saveLocationsAndExtras(std::string locations_collection_file) override
Save a collection of locations/area/paths etc to disk.
bool parse_respond_string(const yarp::os::Bottle &command, yarp::os::Bottle &reply)
yarp::dev::ReturnValue gotoTargetByAbsoluteLocation(yarp::dev::Nav2D::Map2DLocation loc) override
Ask the robot to reach a position defined in the world reference frame.
yarp::dev::ReturnValue deletePath(std::string path_name) override
Delete a path.
ILocalization2DMsgs m_loc_RPC
yarp::dev::ReturnValue deleteArea(std::string location_name) override
Delete an area.
yarp::dev::ReturnValue clearAllAreas() override
Delete all stored areas.
yarp::dev::ReturnValue getNameOfCurrentTarget(std::string &location_name) override
Gets the name of the current target, if available (set by gotoTargetByLocationName)
yarp::dev::ReturnValue renamePath(std::string original_name, std::string new_name) override
Searches for a path and renames it.
yarp::dev::ReturnValue saveMapsCollection(std::string maps_collection_file) override
Save a collection of maps to disk.
yarp::dev::ReturnValue getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
yarp::dev::ReturnValue saveMapToDisk(std::string map_name, std::string file_name) override
Save a map to disk.
yarp::dev::ReturnValue getAllAreas(std::vector< yarp::dev::Nav2D::Map2DArea > &areas) override
Get a list of all stored areas.
yarp::dev::ReturnValue getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path) override
Retrieves a path.
yarp::os::Port m_rpc_port_to_localization_server
yarp::dev::ReturnValue getEstimatedOdometry(yarp::dev::OdometryData &odom) override
Gets the estimated odometry the robot, including its velocity expressed in the world and in the local...
yarp::dev::ReturnValue gotoTargetByLocationName(std::string location_name) override
Ask the robot to reach a previously stored location/area.
yarp::dev::ReturnValue getArea(std::string location_name, yarp::dev::Nav2D::Map2DArea &area) override
Retrieves an area.
yarp::dev::ReturnValue stopNavigation() override
Terminates the current navigation task.
yarp::dev::ReturnValue getLocationsList(std::vector< std::string > &locations) override
Get a list of the names of all stored locations.
yarp::dev::ReturnValue checkNearToLocation(yarp::dev::Nav2D::Map2DLocation loc, bool &is_near, double linear_tolerance, double angular_tolerance=std::numeric_limits< double >::infinity()) override
Check if the robot is currently near to the specified area.
yarp::dev::ReturnValue storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) override
Store a path.
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue clearAllPaths() override
Delete all stored paths.
yarp::dev::ReturnValue followPath(const yarp::dev::Nav2D::Map2DPath &locs) override
Ask the robot to navigate through a set of locations defined in the world reference frame.
yarp::dev::ReturnValue gotoTargetByRelativeLocation(double x, double y, double theta) override
Ask the robot to reach a position defined in the robot reference frame.
yarp::dev::ReturnValue getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
yarp::dev::ReturnValue getNavigationStatus(yarp::dev::Nav2D::NavigationStatusEnum &status) override
Gets the current status of the navigation task.
yarp::dev::ReturnValue store_map(const yarp::dev::Nav2D::MapGrid2D &map) override
Stores a map into the map server.
yarp::dev::ReturnValue getRelativeLocationOfCurrentTarget(double &x, double &y, double &theta) override
Gets the last navigation target in the robot reference frame.
yarp::dev::ReturnValue getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints) override
Returns the list of waypoints generated by the navigation algorithm.
yarp::dev::ReturnValue checkInsideArea(yarp::dev::Nav2D::Map2DArea area, bool &is_inside) override
Check if the robot is currently inside the specified area.
yarp::dev::ReturnValue get_map_names(std::vector< std::string > &map_names) override
Gets a list containing the names of all registered maps.
yarp::dev::ReturnValue recomputeCurrentNavigationPath() override
Forces the navigation system to recompute the path from the current robot position to the current goa...
yarp::dev::ReturnValue remove_map(std::string map_name) override
Removes a map from the map server.
virtual bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map) override
Returns the current navigation map processed by the navigation algorithm.
yarp::dev::ReturnValue storeArea(std::string location_name, yarp::dev::Nav2D::Map2DArea area) override
Store an area.
yarp::os::Port m_rpc_port_to_Map2DServer
yarp::dev::ReturnValue renameLocation(std::string original_name, std::string new_name) override
Searches for a location and renames it.
yarp::dev::ReturnValue get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map) override
Gets a map from the map server.
yarp::dev::ReturnValue getEstimatedPoses(std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
Gets a set of pose estimates computed by the localization algorithm.
yarp::dev::ReturnValue getAbsoluteLocationOfCurrentTarget(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the last navigation target in the world reference frame.
yarp::dev::ReturnValue renameArea(std::string original_name, std::string new_name) override
Searches for an area and renames it.
yarp::dev::ReturnValue stopLocalizationService() override
Stops the localization service.
yarp::dev::ReturnValue resumeNavigation() override
Resume a previously suspended navigation task.
yarp::os::Port m_rpc_port_to_navigation_server
yarp::dev::ReturnValue clearMapTemporaryFlags(std::string map_name) override
Clear all temporary flags from a specific map.
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.