YARP
Yet Another Robot Platform

map2DClient: A device which allows a client application to store/retrieve user maps device in a map server. More...

#include <map2DClient/Map2DClient.h>

+ Inheritance diagram for Map2DClient:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. 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 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 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::IMap2D
virtual ~IMap2D ()
 Destructor. More...
 

Protected Attributes

yarp::os::Port m_rpcPort_to_Map2DServer
 
std::string m_local_name
 
std::string m_map_server
 
std::string m_carrier
 

Detailed Description

map2DClient: A device which allows a client application to store/retrieve user maps device in a map server.

Map2DClient

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 Map2DClient device.
remote - string - - Yes Full port name of the port remotely opened by the Map2DServer, to which the Map2DClient connects to.
carrier - string - tcp No The carier used for the connection with the server.

Definition at line 37 of file Map2DClient.h.

Member Function Documentation

◆ clearAllAreas()

bool Map2DClient::clearAllAreas ( )
overridevirtual

Delete all stored areas.

Returns
true/false

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

Definition at line 783 of file Map2DClient.cpp.

◆ clearAllLocations()

bool Map2DClient::clearAllLocations ( )
overridevirtual

Delete all stored locations.

Returns
true/false

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

Definition at line 757 of file Map2DClient.cpp.

◆ clearAllMaps()

bool Map2DClient::clearAllMaps ( )
overridevirtual

Removes all the registered maps from the server.

Returns
true/false

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

Definition at line 145 of file Map2DClient.cpp.

◆ clearAllMapsTemporaryFlags()

bool Map2DClient::clearAllMapsTemporaryFlags ( )
overridevirtual

Clear all temporary flags from all stored maps.

Returns
true/false

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

Definition at line 809 of file Map2DClient.cpp.

◆ clearAllPaths()

bool Map2DClient::clearAllPaths ( )
overridevirtual

Delete all stored paths.

Returns
true/false

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

Definition at line 862 of file Map2DClient.cpp.

◆ clearMapTemporaryFlags()

bool Map2DClient::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 835 of file Map2DClient.cpp.

◆ close()

bool Map2DClient::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 888 of file Map2DClient.cpp.

◆ deleteArea()

bool Map2DClient::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 629 of file Map2DClient.cpp.

◆ deleteLocation()

bool Map2DClient::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 574 of file Map2DClient.cpp.

◆ deletePath()

bool Map2DClient::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 656 of file Map2DClient.cpp.

◆ enableMapsCompression()

bool Map2DClient::enableMapsCompression ( bool  enable)
overridevirtual

99999999999

Parameters
enable
Returns
true/false

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

Definition at line 1013 of file Map2DClient.cpp.

◆ get_map()

bool Map2DClient::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 106 of file Map2DClient.cpp.

◆ get_map_names()

bool Map2DClient::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 170 of file Map2DClient.cpp.

◆ getAllAreas()

bool Map2DClient::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 745 of file Map2DClient.cpp.

◆ getAllLocations()

bool Map2DClient::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 739 of file Map2DClient.cpp.

◆ getAllPaths()

bool Map2DClient::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 751 of file Map2DClient.cpp.

◆ getArea()

bool Map2DClient::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 494 of file Map2DClient.cpp.

◆ getAreasList()

bool Map2DClient::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 372 of file Map2DClient.cpp.

◆ getLocation()

bool Map2DClient::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 460 of file Map2DClient.cpp.

◆ getLocationsList()

bool Map2DClient::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 328 of file Map2DClient.cpp.

◆ getPath()

bool Map2DClient::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 534 of file Map2DClient.cpp.

◆ getPathsList()

bool Map2DClient::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 416 of file Map2DClient.cpp.

◆ loadLocationsAndExtras()

bool Map2DClient::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 974 of file Map2DClient.cpp.

◆ loadMapFromDisk()

bool Map2DClient::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 1007 of file Map2DClient.cpp.

◆ loadMapsCollection()

bool Map2DClient::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 920 of file Map2DClient.cpp.

◆ open()

bool Map2DClient::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 Map2DClient.cpp.

◆ remove_map()

bool Map2DClient::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 203 of file Map2DClient.cpp.

◆ renameArea()

bool Map2DClient::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 683 of file Map2DClient.cpp.

◆ renameLocation()

bool Map2DClient::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 601 of file Map2DClient.cpp.

◆ renamePath()

bool Map2DClient::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 711 of file Map2DClient.cpp.

◆ saveLocationsAndExtras()

bool Map2DClient::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 947 of file Map2DClient.cpp.

◆ saveMapsCollection()

bool Map2DClient::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 893 of file Map2DClient.cpp.

◆ saveMapToDisk()

bool Map2DClient::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 1001 of file Map2DClient.cpp.

◆ store_map()

bool Map2DClient::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 74 of file Map2DClient.cpp.

◆ storeArea()

bool Map2DClient::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 260 of file Map2DClient.cpp.

◆ storeLocation()

bool Map2DClient::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 229 of file Map2DClient.cpp.

◆ storePath()

bool Map2DClient::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 294 of file Map2DClient.cpp.

Member Data Documentation

◆ m_carrier

std::string Map2DClient::m_carrier
protected

Definition at line 45 of file Map2DClient.h.

◆ m_local_name

std::string Map2DClient::m_local_name
protected

Definition at line 43 of file Map2DClient.h.

◆ m_map_server

std::string Map2DClient::m_map_server
protected

Definition at line 44 of file Map2DClient.h.

◆ m_rpcPort_to_Map2DServer

yarp::os::Port Map2DClient::m_rpcPort_to_Map2DServer
protected

Definition at line 42 of file Map2DClient.h.


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