YARP
Yet Another Robot Platform

navigation2DClient: A device which allows a client application to perform navigation tasks, such as commanding the robot to reach a specific location in a map. More...

#include <navigation2DClient/Navigation2DClient.h>

+ Inheritance diagram for Navigation2DClient:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool parse_respond_string (const yarp::os::Bottle &command, yarp::os::Bottle &reply)
 
virtual bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection. More...
 
bool checkInsideArea (yarp::dev::Nav2D::Map2DArea area) override
 Check if the robot is currently inside the specified area. More...
 
bool checkInsideArea (std::string area_name) override
 Check if the robot is currently inside the specified area. More...
 
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. More...
 
bool checkNearToLocation (std::string location_name, double linear_tolerance, double angular_tolerance=std::numeric_limits< double >::infinity()) override
 Check if the robot is currently near to the specified area. More...
 
bool gotoTargetByAbsoluteLocation (yarp::dev::Nav2D::Map2DLocation loc) override
 Ask the robot to reach a position defined in the world reference frame. More...
 
bool gotoTargetByLocationName (std::string location_name) override
 Ask the robot to reach a previously stored location/area. More...
 
bool gotoTargetByRelativeLocation (double x, double y, double theta) override
 Ask the robot to reach a position defined in the robot reference frame. More...
 
bool gotoTargetByRelativeLocation (double x, double y) override
 Ask the robot to reach a position defined in the robot reference frame. More...
 
bool applyVelocityCommand (double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
 Apply a velocity command. More...
 
bool getLastVelocityCommand (double &x_vel, double &y_vel, double &theta_vel) override
 Returns the last applied velocity command. More...
 
bool recomputeCurrentNavigationPath () override
 Forces the navigation system to recompute the path from the current robot position to the current goal. More...
 
bool getAbsoluteLocationOfCurrentTarget (yarp::dev::Nav2D::Map2DLocation &loc) override
 Gets the last navigation target in the world reference frame. More...
 
bool getNameOfCurrentTarget (std::string &location_name) override
 Gets the name of the current target, if available (set by gotoTargetByLocationName) More...
 
bool getRelativeLocationOfCurrentTarget (double &x, double &y, double &theta) override
 Gets the last navigation target in the robot reference frame. More...
 
bool getCurrentPosition (yarp::dev::Nav2D::Map2DLocation &loc) override
 Gets the current position of the robot w.r.t world reference frame. More...
 
bool getEstimatedOdometry (yarp::dev::OdometryData &odom) override
 Gets the estimated odometry the robot, including its velocity expressed in the world and in the local reference frame. More...
 
bool setInitialPose (const yarp::dev::Nav2D::Map2DLocation &loc) override
 Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame. More...
 
bool getLocalizationStatus (yarp::dev::Nav2D::LocalizationStatusEnum &status) override
 Gets the current status of the localization task. More...
 
bool getEstimatedPoses (std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
 Gets a set of pose estimates computed by the localization algorithm. More...
 
bool setInitialPose (const yarp::dev::Nav2D::Map2DLocation &loc, const yarp::sig::Matrix &cov) override
 Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame. More...
 
bool getCurrentPosition (yarp::dev::Nav2D::Map2DLocation &loc, yarp::sig::Matrix &cov) override
 Gets the current position of the robot w.r.t world reference frame, plus the covariance. More...
 
bool startLocalizationService () override
 Starts the localization service. More...
 
bool stopLocalizationService () override
 Stops the localization service. More...
 
bool storeCurrentPosition (std::string location_name) override
 Store the current location of the robot. More...
 
bool getNavigationStatus (yarp::dev::Nav2D::NavigationStatusEnum &status) override
 Gets the current status of the navigation task. More...
 
bool stopNavigation () override
 Terminates the current navigation task. More...
 
bool suspendNavigation (const double time_s) override
 Ask to the robot to suspend the current navigation task for a defined amount of time. More...
 
bool resumeNavigation () override
 Resume a previously suspended navigation task. More...
 
bool getAllNavigationWaypoints (yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints) override
 Returns the list of waypoints generated by the navigation algorithm. More...
 
bool getCurrentNavigationWaypoint (yarp::dev::Nav2D::Map2DLocation &curr_waypoint) override
 Returns the current waypoint pursued by the navigation algorithm. More...
 
bool getCurrentNavigationMap (yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map) override
 Returns the current navigation map processed by the navigation algorithm. More...
 
bool storeLocation (std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) override
 Store a location specified by the user in the world reference frame. More...
 
bool storeArea (std::string location_name, yarp::dev::Nav2D::Map2DArea area) override
 Store an area. More...
 
bool storePath (std::string path_name, yarp::dev::Nav2D::Map2DPath path) override
 Store a path. More...
 
bool getLocation (std::string location_name, yarp::dev::Nav2D::Map2DLocation &loc) override
 Retrieves a location specified by the user in the world reference frame. More...
 
bool getArea (std::string location_name, yarp::dev::Nav2D::Map2DArea &area) override
 Retrieves an area. More...
 
bool getPath (std::string path_name, yarp::dev::Nav2D::Map2DPath &path) override
 Retrieves a path. More...
 
bool renameLocation (std::string original_name, std::string new_name) override
 Searches for a location and renames it. More...
 
bool renameArea (std::string original_name, std::string new_name) override
 Searches for an area and renames it. More...
 
bool renamePath (std::string original_name, std::string new_name) override
 Searches for a path and renames it. More...
 
bool deleteLocation (std::string location_name) override
 Delete a location. More...
 
bool deleteArea (std::string location_name) override
 Delete an area. More...
 
bool deletePath (std::string path_name) override
 Delete a path. More...
 
bool getLocationsList (std::vector< std::string > &locations) override
 Get a list of the names of all stored locations. More...
 
bool getAreasList (std::vector< std::string > &locations) override
 Get a list of the names of all stored areas. More...
 
bool getPathsList (std::vector< std::string > &paths) override
 Get a list of the names of all stored paths. More...
 
bool getAllLocations (std::vector< yarp::dev::Nav2D::Map2DLocation > &locations) override
 Get a list of all stored locations. More...
 
bool getAllAreas (std::vector< yarp::dev::Nav2D::Map2DArea > &areas) override
 Get a list of all stored areas. More...
 
bool getAllPaths (std::vector< yarp::dev::Nav2D::Map2DPath > &paths) override
 Get a list of all stored paths. More...
 
bool clearAllLocations () override
 Delete all stored locations. More...
 
bool clearAllAreas () override
 Delete all stored areas. More...
 
bool clearAllPaths () override
 Delete all stored paths. More...
 
bool clearAllMaps () override
 Removes all the registered maps from the server. More...
 
bool remove_map (std::string map_name) override
 Removes a map from the map server. More...
 
bool store_map (const yarp::dev::Nav2D::MapGrid2D &map) override
 Stores a map into the map server. More...
 
bool get_map (std::string map_name, yarp::dev::Nav2D::MapGrid2D &map) override
 Gets a map from the map server. More...
 
bool get_map_names (std::vector< std::string > &map_names) override
 Gets a list containing the names of all registered maps. More...
 
bool clearAllMapsTemporaryFlags () override
 Clear all temporary flags from all stored maps. More...
 
bool clearMapTemporaryFlags (std::string map_name) override
 Clear all temporary flags from a specific map. More...
 
bool saveMapsCollection (std::string maps_collection_file) override
 Save a collection of maps to disk. More...
 
bool loadMapsCollection (std::string maps_collection_file) override
 Load a collection of maps from disk. More...
 
bool saveLocationsAndExtras (std::string locations_collection_file) override
 Save a collection of locations/area/paths etc to disk. More...
 
bool loadLocationsAndExtras (std::string locations_collection_file) override
 Load a collection of locations/areas/paths etc from disk. More...
 
bool saveMapToDisk (std::string map_name, std::string file_name) override
 Save a map to disk. More...
 
bool loadMapFromDisk (std::string file_name) override
 Load a map from disk. More...
 
bool enableMapsCompression (bool enable) override
 99999999999 More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
virtual std::string id () const
 Return the id assigned to the PolyDriver. More...
 
virtual void setId (const std::string &id)
 Set the id for this device. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2D
virtual ~INavigation2D ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DTargetActions
virtual ~INavigation2DTargetActions ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DControlActions
virtual ~INavigation2DControlActions ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DVelocityActions
virtual ~INavigation2DVelocityActions ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DExtraActions
virtual ~INavigation2DExtraActions ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::IMap2D
virtual ~IMap2D ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::ILocalization2D
virtual ~ILocalization2D ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 

Protected Attributes

std::mutex m_mutex
 
yarp::os::Port m_rpc_port_to_navigation_server
 
yarp::os::Port m_rpc_port_to_Map2DServer
 
yarp::os::Port m_rpc_port_to_localization_server
 
yarp::os::Port m_rpc_port_user_commands
 
std::string m_local_name
 
std::string m_navigation_server_name
 
std::string m_map_locations_server_name
 
std::string m_localization_server_name
 
int m_period
 
std::string m_carrier
 

Detailed Description

navigation2DClient: A device which allows a client application to perform navigation tasks, such as commanding the robot to reach a specific location in a map.

Navigation2DClient

Parameters required by this device are:

Parameter name SubParameter Type Units Default Value Required Description Notes
local - string - - Yes Full port name opened by the Navigation2DClient device.
navigation_server - string - - Yes Full port name of the port remotely opened by the Navigation server, to which the Navigation2DClient connects to.
map_locations_server - string - - Yes Full port name of the port remotely opened by the Map2DServer, to which the Navigation2DClient connects to.
localization_server - string - - Yes Full port name of the port remotely opened by the Localization server, to which the Navigation2DClient connects to.
carrier - string - tcp No The carier used for the connection with the server.

Definition at line 40 of file Navigation2DClient.h.

Member Function Documentation

◆ applyVelocityCommand()

bool Navigation2DClient::applyVelocityCommand ( double  x_vel,
double  y_vel,
double  theta_vel,
double  timeout = 0.1 
)
overridevirtual

Apply a velocity command.

Velocities are expressed in the robot reference frame.

Parameters
x[m/s]
y[m/s]
theta[deg/s]
timeoutThe velocity command expires after the specified amount of time (by default 0.1 seconds)
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DVelocityActions.

Definition at line 33 of file Navigation2DClient_iVelActs.cpp.

◆ checkInsideArea() [1/2]

bool Navigation2DClient::checkInsideArea ( std::string  area_name)
overridevirtual

Check if the robot is currently inside the specified area.

Parameters
area_namethe name of an area previously saved
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 550 of file Navigation2DClient.cpp.

◆ checkInsideArea() [2/2]

bool Navigation2DClient::checkInsideArea ( yarp::dev::Nav2D::Map2DArea  area)
overridevirtual

Check if the robot is currently inside the specified area.

Parameters
areathe area to be checked
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 532 of file Navigation2DClient.cpp.

◆ checkNearToLocation() [1/2]

bool Navigation2DClient::checkNearToLocation ( std::string  location_name,
double  linear_tolerance,
double  angular_tolerance = std::numeric_limits< double >::infinity() 
)
overridevirtual

Check if the robot is currently near to the specified area.

Parameters
location_namethe name of the location: it will be searched in the server
linear_tolerancelinear tolerance [m]
angular_tolerance[deg]
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 513 of file Navigation2DClient.cpp.

◆ checkNearToLocation() [2/2]

bool Navigation2DClient::checkNearToLocation ( yarp::dev::Nav2D::Map2DLocation  loc,
double  linear_tolerance,
double  angular_tolerance = std::numeric_limits< double >::infinity() 
)
overridevirtual

Check if the robot is currently near to the specified area.

Parameters
locthe location to be checked
linear_tolerancelinear tolerance [m]
angular_tolerance[deg 0-360]
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 501 of file Navigation2DClient.cpp.

◆ clearAllAreas()

bool Navigation2DClient::clearAllAreas ( )
overridevirtual

Delete all stored areas.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 276 of file Navigation2DClient_iMap2D.cpp.

◆ clearAllLocations()

bool Navigation2DClient::clearAllLocations ( )
overridevirtual

Delete all stored locations.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 214 of file Navigation2DClient_iMap2D.cpp.

◆ clearAllMaps()

bool Navigation2DClient::clearAllMaps ( )
overridevirtual

Removes all the registered maps from the server.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 396 of file Navigation2DClient_iMap2D.cpp.

◆ clearAllMapsTemporaryFlags()

bool Navigation2DClient::clearAllMapsTemporaryFlags ( )
overridevirtual

Clear all temporary flags from all stored maps.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 288 of file Navigation2DClient_iMap2D.cpp.

◆ clearAllPaths()

bool Navigation2DClient::clearAllPaths ( )
overridevirtual

Delete all stored paths.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 282 of file Navigation2DClient_iMap2D.cpp.

◆ clearMapTemporaryFlags()

bool Navigation2DClient::clearMapTemporaryFlags ( std::string  map_name)
overridevirtual

Clear all temporary flags from a specific map.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 294 of file Navigation2DClient_iMap2D.cpp.

◆ close()

bool Navigation2DClient::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 151 of file Navigation2DClient.cpp.

◆ deleteArea()

bool Navigation2DClient::deleteArea ( std::string  area_name)
overridevirtual

Delete an area.

Parameters
area_namethe name of the area
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 342 of file Navigation2DClient_iMap2D.cpp.

◆ deleteLocation()

bool Navigation2DClient::deleteLocation ( std::string  location_name)
overridevirtual

Delete a location.

Parameters
location_namethe name of the location
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 187 of file Navigation2DClient_iMap2D.cpp.

◆ deletePath()

bool Navigation2DClient::deletePath ( std::string  path_name)
overridevirtual

Delete a path.

Parameters
path_namethe name of the path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 348 of file Navigation2DClient_iMap2D.cpp.

◆ enableMapsCompression()

bool Navigation2DClient::enableMapsCompression ( bool  enable)
overridevirtual

99999999999

Parameters
enable
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 336 of file Navigation2DClient_iMap2D.cpp.

◆ get_map()

bool Navigation2DClient::get_map ( std::string  map_name,
yarp::dev::Nav2D::MapGrid2D map 
)
overridevirtual

Gets a map from the map server.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 384 of file Navigation2DClient_iMap2D.cpp.

◆ get_map_names()

bool Navigation2DClient::get_map_names ( std::vector< std::string > &  map_names)
overridevirtual

Gets a list containing the names of all registered maps.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 390 of file Navigation2DClient_iMap2D.cpp.

◆ getAbsoluteLocationOfCurrentTarget()

bool Navigation2DClient::getAbsoluteLocationOfCurrentTarget ( yarp::dev::Nav2D::Map2DLocation loc)
overridevirtual

Gets the last navigation target in the world reference frame.

Parameters
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 113 of file Navigation2DClient_iNav2DTarget.cpp.

◆ getAllAreas()

bool Navigation2DClient::getAllAreas ( std::vector< yarp::dev::Nav2D::Map2DArea > &  areas)
overridevirtual

Get a list of all stored areas.

Parameters
thereturned list of areas
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 264 of file Navigation2DClient_iMap2D.cpp.

◆ getAllLocations()

bool Navigation2DClient::getAllLocations ( std::vector< yarp::dev::Nav2D::Map2DLocation > &  locations)
overridevirtual

Get a list of all stored locations.

Parameters
thereturned list of locations
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 258 of file Navigation2DClient_iMap2D.cpp.

◆ getAllNavigationWaypoints()

bool Navigation2DClient::getAllNavigationWaypoints ( yarp::dev::Nav2D::TrajectoryTypeEnum  trajectory_type,
yarp::dev::Nav2D::Map2DPath waypoints 
)
overridevirtual

Returns the list of waypoints generated by the navigation algorithm.

Parameters
trajectory_typespecifies if we are requesting the waypoints of the global trajectory or the waypoints of the local trajectory
waypointsthe list of waypoints generated by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 157 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ getAllPaths()

bool Navigation2DClient::getAllPaths ( std::vector< yarp::dev::Nav2D::Map2DPath > &  paths)
overridevirtual

Get a list of all stored paths.

Parameters
thereturned list of paths
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 270 of file Navigation2DClient_iMap2D.cpp.

◆ getArea()

bool Navigation2DClient::getArea ( std::string  area_name,
yarp::dev::Nav2D::Map2DArea area 
)
overridevirtual

Retrieves an area.

Parameters
area_namethe name of the area
areathe area
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 148 of file Navigation2DClient_iMap2D.cpp.

◆ getAreasList()

bool Navigation2DClient::getAreasList ( std::vector< std::string > &  areas)
overridevirtual

Get a list of the names of all stored areas.

Parameters
thereturned list of areas names
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 354 of file Navigation2DClient_iMap2D.cpp.

◆ getCurrentNavigationMap()

bool Navigation2DClient::getCurrentNavigationMap ( yarp::dev::Nav2D::NavigationMapTypeEnum  map_type,
yarp::dev::Nav2D::MapGrid2D map 
)
overridevirtual

Returns the current navigation map processed by the navigation algorithm.

Parameters
map_typethe map to be requested (e.g. global, local, etc.)
mapthe map, currently used by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 249 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ getCurrentNavigationWaypoint()

bool Navigation2DClient::getCurrentNavigationWaypoint ( yarp::dev::Nav2D::Map2DLocation curr_waypoint)
overridevirtual

Returns the current waypoint pursued by the navigation algorithm.

Parameters
curr_waypointthe current waypoint pursued by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 207 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ getCurrentPosition() [1/2]

bool Navigation2DClient::getCurrentPosition ( yarp::dev::Nav2D::Map2DLocation loc)
overridevirtual

Gets the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 173 of file Navigation2DClient_iLocalization2D.cpp.

◆ getCurrentPosition() [2/2]

bool Navigation2DClient::getCurrentPosition ( yarp::dev::Nav2D::Map2DLocation loc,
yarp::sig::Matrix cov 
)
overridevirtual

Gets the current position of the robot w.r.t world reference frame, plus the covariance.

Parameters
locthe location of the robot
covthe 3x3 covariance matrix
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 92 of file Navigation2DClient_iLocalization2D.cpp.

◆ getEstimatedOdometry()

bool Navigation2DClient::getEstimatedOdometry ( yarp::dev::OdometryData odom)
overridevirtual

Gets the estimated odometry the robot, including its velocity expressed in the world and in the local reference frame.

Parameters
locthe estimated odometry.
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 135 of file Navigation2DClient_iLocalization2D.cpp.

◆ getEstimatedPoses()

bool Navigation2DClient::getEstimatedPoses ( std::vector< yarp::dev::Nav2D::Map2DLocation > &  poses)
overridevirtual

Gets a set of pose estimates computed by the localization algorithm.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 236 of file Navigation2DClient_iLocalization2D.cpp.

◆ getLastVelocityCommand()

bool Navigation2DClient::getLastVelocityCommand ( double &  x_vel,
double &  y_vel,
double &  theta_vel 
)
overridevirtual

Returns the last applied velocity command.

Parameters
x[m/s]
y[m/s]
theta[deg/s]
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DVelocityActions.

Definition at line 27 of file Navigation2DClient_iVelActs.cpp.

◆ getLocalizationStatus()

bool Navigation2DClient::getLocalizationStatus ( yarp::dev::Nav2D::LocalizationStatusEnum status)
overridevirtual

Gets the current status of the localization task.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 206 of file Navigation2DClient_iLocalization2D.cpp.

◆ getLocation()

bool Navigation2DClient::getLocation ( std::string  location_name,
yarp::dev::Nav2D::Map2DLocation loc 
)
overridevirtual

Retrieves a location specified by the user in the world reference frame.

Parameters
location_namethe name of the location
locthe location
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 114 of file Navigation2DClient_iMap2D.cpp.

◆ getLocationsList()

bool Navigation2DClient::getLocationsList ( std::vector< std::string > &  locations)
overridevirtual

Get a list of the names of all stored locations.

Parameters
thereturned list of locations names
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 70 of file Navigation2DClient_iMap2D.cpp.

◆ getNameOfCurrentTarget()

bool Navigation2DClient::getNameOfCurrentTarget ( std::string &  location_name)
overridevirtual

Gets the name of the current target, if available (set by gotoTargetByLocationName)

Parameters
location_namethe name of the current target
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 631 of file Navigation2DClient.cpp.

◆ getNavigationStatus()

bool Navigation2DClient::getNavigationStatus ( yarp::dev::Nav2D::NavigationStatusEnum status)
overridevirtual

Gets the current status of the navigation task.

Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 27 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ getPath()

bool Navigation2DClient::getPath ( std::string  path_name,
yarp::dev::Nav2D::Map2DPath path 
)
overridevirtual

Retrieves a path.

Parameters
path_namethe name of the path
paththe path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 366 of file Navigation2DClient_iMap2D.cpp.

◆ getPathsList()

bool Navigation2DClient::getPathsList ( std::vector< std::string > &  paths)
overridevirtual

Get a list of the names of all stored paths.

Parameters
thereturned list of paths names
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 360 of file Navigation2DClient_iMap2D.cpp.

◆ getRelativeLocationOfCurrentTarget()

bool Navigation2DClient::getRelativeLocationOfCurrentTarget ( double &  x,
double &  y,
double &  theta 
)
overridevirtual

Gets the last navigation target in the robot reference frame.

Parameters
x
y
theta
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 146 of file Navigation2DClient_iNav2DTarget.cpp.

◆ gotoTargetByAbsoluteLocation()

bool Navigation2DClient::gotoTargetByAbsoluteLocation ( yarp::dev::Nav2D::Map2DLocation  loc)
overridevirtual

Ask the robot to reach a position defined in the world reference frame.

Parameters
locthe location to be reached
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 27 of file Navigation2DClient_iNav2DTarget.cpp.

◆ gotoTargetByLocationName()

bool Navigation2DClient::gotoTargetByLocationName ( std::string  location_or_area_name)
overridevirtual

Ask the robot to reach a previously stored location/area.

Parameters
location_namethe name of a location/area previously saved
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 575 of file Navigation2DClient.cpp.

◆ gotoTargetByRelativeLocation() [1/2]

bool Navigation2DClient::gotoTargetByRelativeLocation ( double  x,
double  y 
)
overridevirtual

Ask the robot to reach a position defined in the robot reference frame.

The final orientation of the goal is unspecified.

Parameters
x
y
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 56 of file Navigation2DClient_iNav2DTarget.cpp.

◆ gotoTargetByRelativeLocation() [2/2]

bool Navigation2DClient::gotoTargetByRelativeLocation ( double  x,
double  y,
double  theta 
)
overridevirtual

Ask the robot to reach a position defined in the robot reference frame.

Parameters
x
y
theta
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 84 of file Navigation2DClient_iNav2DTarget.cpp.

◆ loadLocationsAndExtras()

bool Navigation2DClient::loadLocationsAndExtras ( std::string  file_name)
overridevirtual

Load a collection of locations/areas/paths etc from disk.

Parameters
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 318 of file Navigation2DClient_iMap2D.cpp.

◆ loadMapFromDisk()

bool Navigation2DClient::loadMapFromDisk ( std::string  file_name)
overridevirtual

Load a map from disk.

Parameters
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 330 of file Navigation2DClient_iMap2D.cpp.

◆ loadMapsCollection()

bool Navigation2DClient::loadMapsCollection ( std::string  file_name)
overridevirtual

Load a collection of maps from disk.

Parameters
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 306 of file Navigation2DClient_iMap2D.cpp.

◆ open()

bool Navigation2DClient::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 27 of file Navigation2DClient.cpp.

◆ parse_respond_string()

bool Navigation2DClient::parse_respond_string ( const yarp::os::Bottle command,
yarp::os::Bottle reply 
)

Definition at line 160 of file Navigation2DClient.cpp.

◆ read()

bool Navigation2DClient::read ( yarp::os::ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::PortReader.

Definition at line 473 of file Navigation2DClient.cpp.

◆ recomputeCurrentNavigationPath()

bool Navigation2DClient::recomputeCurrentNavigationPath ( )
overridevirtual

Forces the navigation system to recompute the path from the current robot position to the current goal.

If no goal has been set, the command has no effect.

Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 56 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ remove_map()

bool Navigation2DClient::remove_map ( std::string  map_name)
overridevirtual

Removes a map from the map server.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 372 of file Navigation2DClient_iMap2D.cpp.

◆ renameArea()

bool Navigation2DClient::renameArea ( std::string  original_name,
std::string  new_name 
)
overridevirtual

Searches for an area and renames it.

Parameters
original_namethe name of the area
new_namethe new name of the area
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 246 of file Navigation2DClient_iMap2D.cpp.

◆ renameLocation()

bool Navigation2DClient::renameLocation ( std::string  original_name,
std::string  new_name 
)
overridevirtual

Searches for a location and renames it.

Parameters
original_namethe name of the area
new_namethe new name of the area
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 240 of file Navigation2DClient_iMap2D.cpp.

◆ renamePath()

bool Navigation2DClient::renamePath ( std::string  original_name,
std::string  new_name 
)
overridevirtual

Searches for a path and renames it.

Parameters
original_namethe name of the path
new_namethe new name of the path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 252 of file Navigation2DClient_iMap2D.cpp.

◆ resumeNavigation()

bool Navigation2DClient::resumeNavigation ( )
overridevirtual

Resume a previously suspended navigation task.

Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 132 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ saveLocationsAndExtras()

bool Navigation2DClient::saveLocationsAndExtras ( std::string  file_name)
overridevirtual

Save a collection of locations/area/paths etc to disk.

Parameters
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 312 of file Navigation2DClient_iMap2D.cpp.

◆ saveMapsCollection()

bool Navigation2DClient::saveMapsCollection ( std::string  file_name)
overridevirtual

Save a collection of maps to disk.

Parameters
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 300 of file Navigation2DClient_iMap2D.cpp.

◆ saveMapToDisk()

bool Navigation2DClient::saveMapToDisk ( std::string  map_name,
std::string  file_name 
)
overridevirtual

Save a map to disk.

Parameters
map_namethe name of the area
file_namefile name with full path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 324 of file Navigation2DClient_iMap2D.cpp.

◆ setInitialPose() [1/2]

bool Navigation2DClient::setInitialPose ( const yarp::dev::Nav2D::Map2DLocation loc)
overridevirtual

Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 27 of file Navigation2DClient_iLocalization2D.cpp.

◆ setInitialPose() [2/2]

bool Navigation2DClient::setInitialPose ( const yarp::dev::Nav2D::Map2DLocation loc,
const yarp::sig::Matrix cov 
)
overridevirtual

Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
covthe 3x3 covariance matrix
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 56 of file Navigation2DClient_iLocalization2D.cpp.

◆ startLocalizationService()

bool Navigation2DClient::startLocalizationService ( )
overridevirtual

Starts the localization service.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 286 of file Navigation2DClient_iLocalization2D.cpp.

◆ stopLocalizationService()

bool Navigation2DClient::stopLocalizationService ( )
overridevirtual

Stops the localization service.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 311 of file Navigation2DClient_iLocalization2D.cpp.

◆ stopNavigation()

bool Navigation2DClient::stopNavigation ( )
overridevirtual

Terminates the current navigation task.

Cannot be resumed.

Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 107 of file Navigation2DClient_iNav2DCtrl.cpp.

◆ store_map()

bool Navigation2DClient::store_map ( const yarp::dev::Nav2D::MapGrid2D map)
overridevirtual

Stores a map into the map server.

Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 378 of file Navigation2DClient_iMap2D.cpp.

◆ storeArea()

bool Navigation2DClient::storeArea ( std::string  area_name,
yarp::dev::Nav2D::Map2DArea  area 
)
overridevirtual

Store an area.

Parameters
area_namethe name of the area
areathe area
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 58 of file Navigation2DClient_iMap2D.cpp.

◆ storeCurrentPosition()

bool Navigation2DClient::storeCurrentPosition ( std::string  location_name)
overridevirtual

Store the current location of the robot.

Parameters
location_namethe name of the location
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DExtraActions.

Definition at line 661 of file Navigation2DClient.cpp.

◆ storeLocation()

bool Navigation2DClient::storeLocation ( std::string  location_name,
yarp::dev::Nav2D::Map2DLocation  loc 
)
overridevirtual

Store a location specified by the user in the world reference frame.

Parameters
location_namethe name of the location
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 27 of file Navigation2DClient_iMap2D.cpp.

◆ storePath()

bool Navigation2DClient::storePath ( std::string  path_name,
yarp::dev::Nav2D::Map2DPath  path 
)
overridevirtual

Store a path.

Parameters
path_namethe name of the path
paththe path
Returns
true/false

Implements yarp::dev::Nav2D::IMap2D.

Definition at line 64 of file Navigation2DClient_iMap2D.cpp.

◆ suspendNavigation()

bool Navigation2DClient::suspendNavigation ( const double  time_s)
overridevirtual

Ask to the robot to suspend the current navigation task for a defined amount of time.

Can be resumed by resume().

Parameters
time_s
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 81 of file Navigation2DClient_iNav2DCtrl.cpp.

Member Data Documentation

◆ m_carrier

std::string Navigation2DClient::m_carrier
protected

Definition at line 56 of file Navigation2DClient.h.

◆ m_local_name

std::string Navigation2DClient::m_local_name
protected

Definition at line 51 of file Navigation2DClient.h.

◆ m_localization_server_name

std::string Navigation2DClient::m_localization_server_name
protected

Definition at line 54 of file Navigation2DClient.h.

◆ m_map_locations_server_name

std::string Navigation2DClient::m_map_locations_server_name
protected

Definition at line 53 of file Navigation2DClient.h.

◆ m_mutex

std::mutex Navigation2DClient::m_mutex
protected

Definition at line 46 of file Navigation2DClient.h.

◆ m_navigation_server_name

std::string Navigation2DClient::m_navigation_server_name
protected

Definition at line 52 of file Navigation2DClient.h.

◆ m_period

int Navigation2DClient::m_period
protected

Definition at line 55 of file Navigation2DClient.h.

◆ m_rpc_port_to_localization_server

yarp::os::Port Navigation2DClient::m_rpc_port_to_localization_server
protected

Definition at line 49 of file Navigation2DClient.h.

◆ m_rpc_port_to_Map2DServer

yarp::os::Port Navigation2DClient::m_rpc_port_to_Map2DServer
protected

Definition at line 48 of file Navigation2DClient.h.

◆ m_rpc_port_to_navigation_server

yarp::os::Port Navigation2DClient::m_rpc_port_to_navigation_server
protected

Definition at line 47 of file Navigation2DClient.h.

◆ m_rpc_port_user_commands

yarp::os::Port Navigation2DClient::m_rpc_port_user_commands
protected

Definition at line 50 of file Navigation2DClient.h.


The documentation for this class was generated from the following files: