YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches

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

#include <networkWrappers/map2D_nwc_yarp/Map2D_nwc_yarp.h>

+ Inheritance diagram for Map2D_nwc_yarp:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
bool clearAllMaps () override
 Removes all the registered maps from the server.
 
bool remove_map (std::string map_name) override
 Removes a map from the map server.
 
bool store_map (const yarp::dev::Nav2D::MapGrid2D &map) override
 Stores a map into the map server.
 
bool get_map (std::string map_name, yarp::dev::Nav2D::MapGrid2D &map) override
 Gets a map from the map server.
 
bool get_map_names (std::vector< std::string > &map_names) override
 Gets a list containing the names of all registered maps.
 
bool storeLocation (std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) override
 Store a location specified by the user in the world reference frame.
 
bool storeArea (std::string area_name, yarp::dev::Nav2D::Map2DArea area) override
 Store an area.
 
bool storePath (std::string path_name, yarp::dev::Nav2D::Map2DPath path) override
 Store a path.
 
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 getArea (std::string location_name, yarp::dev::Nav2D::Map2DArea &area) override
 Retrieves an area.
 
bool getPath (std::string path_name, yarp::dev::Nav2D::Map2DPath &path) override
 Retrieves a path.
 
bool renameLocation (std::string original_name, std::string new_name) override
 Searches for a location and renames it.
 
bool renameArea (std::string original_name, std::string new_name) override
 Searches for an area and renames it.
 
bool renamePath (std::string original_name, std::string new_name) override
 Searches for a path and renames it.
 
bool deleteLocation (std::string location_name) override
 Delete a location.
 
bool deleteArea (std::string location_name) override
 Delete an area.
 
bool deletePath (std::string path_name) override
 Delete a path.
 
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 getPathsList (std::vector< std::string > &paths) override
 Get a list of the names of all stored paths.
 
bool getAllLocations (std::vector< yarp::dev::Nav2D::Map2DLocation > &locations) override
 Get a list of all stored locations.
 
bool getAllAreas (std::vector< yarp::dev::Nav2D::Map2DArea > &areas) override
 Get a list of all stored areas.
 
bool getAllPaths (std::vector< yarp::dev::Nav2D::Map2DPath > &paths) override
 Get a list of all stored paths.
 
bool clearAllLocations () override
 Delete all stored locations.
 
bool clearAllAreas () override
 Delete all stored areas.
 
bool clearAllPaths () override
 Delete all stored paths.
 
bool clearAllMapsTemporaryFlags () override
 Clear all temporary flags from all stored maps.
 
bool clearMapTemporaryFlags (std::string map_name) override
 Clear all temporary flags from a specific map.
 
bool saveMapsCollection (std::string maps_collection_file) override
 Save a collection of maps to disk.
 
bool loadMapsCollection (std::string maps_collection_file) override
 Load a collection of maps from disk.
 
bool saveLocationsAndExtras (std::string locations_collection_file) override
 Save a collection of locations/area/paths etc to disk.
 
bool loadLocationsAndExtras (std::string locations_collection_file) override
 Load a collection of locations/areas/paths etc from disk.
 
bool saveMapToDisk (std::string map_name, std::string file_name) override
 Save a map to disk.
 
bool loadMapFromDisk (std::string file_name) override
 Load a map from disk.
 
bool enableMapsCompression (bool enable) override
 99999999999
 
- 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
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::Nav2D::IMap2D
virtual ~IMap2D ()
 Destructor.
 
- Public Member Functions inherited from Map2D_nwc_yarp_ParamsParser
 Map2D_nwc_yarp_ParamsParser ()
 
 ~Map2D_nwc_yarp_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Protected Attributes

yarp::os::Port m_rpcPort_to_Map2D_nws
 
IMap2DMsgs m_map_RPC
 
std::mutex m_mutex
 

Additional Inherited Members

- Public Attributes inherited from Map2D_nwc_yarp_ParamsParser
const std::string m_device_classname = {"Map2D_nwc_yarp"}
 
const std::string m_device_name = {"map2D_nwc_yarp"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_local_defaultValue = {""}
 
const std::string m_remote_defaultValue = {""}
 
const std::string m_carrier_defaultValue = {"fast_tcp"}
 
std::string m_local = {}
 
std::string m_remote = {}
 
std::string m_carrier = {"fast_tcp"}
 

Detailed Description

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

Map2D_nwc_yarp

Parameters required by this device are shown in class: Map2D_nwc_yarp_ParamsParser

Definition at line 35 of file Map2D_nwc_yarp.h.

Member Function Documentation

◆ clearAllAreas()

bool Map2D_nwc_yarp::clearAllAreas ( )
overridevirtual

Delete all stored areas.

Returns
true/false

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

Definition at line 281 of file Map2D_nwc_yarp.cpp.

◆ clearAllLocations()

bool Map2D_nwc_yarp::clearAllLocations ( )
overridevirtual

Delete all stored locations.

Returns
true/false

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

Definition at line 275 of file Map2D_nwc_yarp.cpp.

◆ clearAllMaps()

bool Map2D_nwc_yarp::clearAllMaps ( )
overridevirtual

Removes all the registered maps from the server.

Returns
true/false

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

Definition at line 79 of file Map2D_nwc_yarp.cpp.

◆ clearAllMapsTemporaryFlags()

bool Map2D_nwc_yarp::clearAllMapsTemporaryFlags ( )
overridevirtual

Clear all temporary flags from all stored maps.

Returns
true/false

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

Definition at line 287 of file Map2D_nwc_yarp.cpp.

◆ clearAllPaths()

bool Map2D_nwc_yarp::clearAllPaths ( )
overridevirtual

Delete all stored paths.

Returns
true/false

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

Definition at line 299 of file Map2D_nwc_yarp.cpp.

◆ clearMapTemporaryFlags()

bool Map2D_nwc_yarp::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 293 of file Map2D_nwc_yarp.cpp.

◆ close()

bool Map2D_nwc_yarp::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 305 of file Map2D_nwc_yarp.cpp.

◆ deleteArea()

bool Map2D_nwc_yarp::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 251 of file Map2D_nwc_yarp.cpp.

◆ deleteLocation()

bool Map2D_nwc_yarp::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 239 of file Map2D_nwc_yarp.cpp.

◆ deletePath()

bool Map2D_nwc_yarp::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 257 of file Map2D_nwc_yarp.cpp.

◆ enableMapsCompression()

bool Map2D_nwc_yarp::enableMapsCompression ( bool  enable)
overridevirtual

99999999999

Parameters
enable
Returns
true/false

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

Definition at line 346 of file Map2D_nwc_yarp.cpp.

◆ get_map()

bool Map2D_nwc_yarp::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 66 of file Map2D_nwc_yarp.cpp.

◆ get_map_names()

bool Map2D_nwc_yarp::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 85 of file Map2D_nwc_yarp.cpp.

◆ getAllAreas()

bool Map2D_nwc_yarp::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 174 of file Map2D_nwc_yarp.cpp.

◆ getAllLocations()

bool Map2D_nwc_yarp::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 161 of file Map2D_nwc_yarp.cpp.

◆ getAllPaths()

bool Map2D_nwc_yarp::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 187 of file Map2D_nwc_yarp.cpp.

◆ getArea()

bool Map2D_nwc_yarp::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 213 of file Map2D_nwc_yarp.cpp.

◆ getAreasList()

bool Map2D_nwc_yarp::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 135 of file Map2D_nwc_yarp.cpp.

◆ getLocation()

bool Map2D_nwc_yarp::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 200 of file Map2D_nwc_yarp.cpp.

◆ getLocationsList()

bool Map2D_nwc_yarp::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 122 of file Map2D_nwc_yarp.cpp.

◆ getPath()

bool Map2D_nwc_yarp::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 226 of file Map2D_nwc_yarp.cpp.

◆ getPathsList()

bool Map2D_nwc_yarp::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 148 of file Map2D_nwc_yarp.cpp.

◆ loadLocationsAndExtras()

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

◆ loadMapFromDisk()

bool Map2D_nwc_yarp::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 340 of file Map2D_nwc_yarp.cpp.

◆ loadMapsCollection()

bool Map2D_nwc_yarp::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 316 of file Map2D_nwc_yarp.cpp.

◆ open()

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

◆ remove_map()

bool Map2D_nwc_yarp::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 98 of file Map2D_nwc_yarp.cpp.

◆ renameArea()

bool Map2D_nwc_yarp::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 263 of file Map2D_nwc_yarp.cpp.

◆ renameLocation()

bool Map2D_nwc_yarp::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 245 of file Map2D_nwc_yarp.cpp.

◆ renamePath()

bool Map2D_nwc_yarp::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 269 of file Map2D_nwc_yarp.cpp.

◆ saveLocationsAndExtras()

bool Map2D_nwc_yarp::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 322 of file Map2D_nwc_yarp.cpp.

◆ saveMapsCollection()

bool Map2D_nwc_yarp::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 310 of file Map2D_nwc_yarp.cpp.

◆ saveMapToDisk()

bool Map2D_nwc_yarp::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 334 of file Map2D_nwc_yarp.cpp.

◆ store_map()

bool Map2D_nwc_yarp::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 60 of file Map2D_nwc_yarp.cpp.

◆ storeArea()

bool Map2D_nwc_yarp::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 110 of file Map2D_nwc_yarp.cpp.

◆ storeLocation()

bool Map2D_nwc_yarp::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 104 of file Map2D_nwc_yarp.cpp.

◆ storePath()

bool Map2D_nwc_yarp::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 116 of file Map2D_nwc_yarp.cpp.

Member Data Documentation

◆ m_map_RPC

IMap2DMsgs Map2D_nwc_yarp::m_map_RPC
protected

Definition at line 42 of file Map2D_nwc_yarp.h.

◆ m_mutex

std::mutex Map2D_nwc_yarp::m_mutex
protected

Definition at line 43 of file Map2D_nwc_yarp.h.

◆ m_rpcPort_to_Map2D_nws

yarp::os::Port Map2D_nwc_yarp::m_rpcPort_to_Map2D_nws
protected

Definition at line 41 of file Map2D_nwc_yarp.h.


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