38 yCError(MAP2D_NWC_YARP,
"open() error you have to provide valid local name");
43 yCError(MAP2D_NWC_YARP,
"open() error you have to provide valid remote name");
48 local_rpc1 +=
"/mapClient_rpc";
51 remote_rpc1 +=
"/rpc";
55 yCError(MAP2D_NWC_YARP,
"open() error could not open rpc port %s, check network", local_rpc1.c_str());
60 ok=Network::connect(local_rpc1, remote_rpc1,
m_carrier);
63 yCError(MAP2D_NWC_YARP,
"open() error could not connect to %s", remote_rpc1.c_str());
69 yCError(MAP2D_NWC_YARP,
"Error! Cannot attach the port as a client");
78 std::lock_guard <std::mutex> lg(
m_mutex);
84 std::lock_guard <std::mutex> lg(
m_mutex);
88 yCError(MAP2D_NWC_YARP,
"Unable to get_map");
97 std::lock_guard <std::mutex> lg(
m_mutex);
103 std::lock_guard <std::mutex> lg(
m_mutex);
107 yCError(MAP2D_NWC_YARP,
"Unable to get_map_names");
110 map_names =
ret.map_names;
116 std::lock_guard <std::mutex> lg(
m_mutex);
122 std::lock_guard <std::mutex> lg(
m_mutex);
128 std::lock_guard <std::mutex> lg(
m_mutex);
134 std::lock_guard <std::mutex> lg(
m_mutex);
140 std::lock_guard <std::mutex> lg(
m_mutex);
144 yCError(MAP2D_NWC_YARP,
"Unable to getLocationsList");
147 locations =
ret.locations;
153 std::lock_guard <std::mutex> lg(
m_mutex);
157 yCError(MAP2D_NWC_YARP,
"Unable to getAreasList");
166 std::lock_guard <std::mutex> lg(
m_mutex);
170 yCError(MAP2D_NWC_YARP,
"Unable to getPathsList");
179 std::lock_guard <std::mutex> lg(
m_mutex);
183 yCError(MAP2D_NWC_YARP,
"Unable to getAllLocations");
186 locations =
ret.locations;
192 std::lock_guard <std::mutex> lg(
m_mutex);
196 yCError(MAP2D_NWC_YARP,
"Unable to getAllAreas");
205 std::lock_guard <std::mutex> lg(
m_mutex);
209 yCError(MAP2D_NWC_YARP,
"Unable to getAllPaths");
218 std::lock_guard <std::mutex> lg(
m_mutex);
222 yCError(MAP2D_NWC_YARP,
"Unable to getLocation");
231 std::lock_guard <std::mutex> lg(
m_mutex);
235 yCError(MAP2D_NWC_YARP,
"Unable to getArea");
244 std::lock_guard <std::mutex> lg(
m_mutex);
248 yCError(MAP2D_NWC_YARP,
"Unable to getPath");
257 std::lock_guard <std::mutex> lg(
m_mutex);
263 std::lock_guard <std::mutex> lg(
m_mutex);
269 std::lock_guard <std::mutex> lg(
m_mutex);
275 std::lock_guard <std::mutex> lg(
m_mutex);
281 std::lock_guard <std::mutex> lg(
m_mutex);
287 std::lock_guard <std::mutex> lg(
m_mutex);
293 std::lock_guard <std::mutex> lg(
m_mutex);
299 std::lock_guard <std::mutex> lg(
m_mutex);
305 std::lock_guard <std::mutex> lg(
m_mutex);
311 std::lock_guard <std::mutex> lg(
m_mutex);
317 std::lock_guard <std::mutex> lg(
m_mutex);
328 std::lock_guard <std::mutex> lg(
m_mutex);
334 std::lock_guard <std::mutex> lg(
m_mutex);
340 std::lock_guard <std::mutex> lg(
m_mutex);
346 std::lock_guard <std::mutex> lg(
m_mutex);
352 std::lock_guard <std::mutex> lg(
m_mutex);
358 std::lock_guard <std::mutex> lg(
m_mutex);
364 std::lock_guard <std::mutex> lg(
m_mutex);
virtual return_get_map_names get_map_names_RPC()
virtual bool rename_path_RPC(const std::string &original_name, const std::string &new_name)
virtual bool store_path_RPC(const std::string &path_name, const yarp::dev::Nav2D::Map2DPath &path)
virtual bool clear_all_areas_RPC()
virtual bool clear_all_paths_RPC()
virtual bool save_map_to_disk_RPC(const std::string &map_name, const std::string &file_name)
virtual bool store_map_RPC(const yarp::dev::Nav2D::MapGrid2D &themap)
virtual bool load_map_from_disk_RPC(const std::string &file_name)
virtual bool delete_location_RPC(const std::string &location_name)
virtual bool clear_all_maps_temporary_flags_RPC()
virtual return_get_all_areas get_all_areas_RPC()
virtual bool load_locations_and_extras_RPC(const std::string &locations_collection_file)
virtual bool clear_map_temporary_flags_RPC(const std::string &map_name)
virtual return_get_location get_location_RPC(const std::string &location_name)
virtual bool load_maps_collection_RPC(const std::string &maps_collection_file)
virtual bool delete_path_RPC(const std::string &path_name)
virtual return_get_areas_list get_areas_list_RPC()
virtual return_get_path get_path_RPC(const std::string &path_name)
virtual bool store_location_RPC(const std::string &location_name, const yarp::dev::Nav2D::Map2DLocation &loc)
virtual bool clear_all_maps_RPC()
virtual return_get_area get_area_RPC(const std::string &area_name)
virtual return_get_all_paths get_all_paths_RPC()
virtual return_get_map get_map_RPC(const std::string &map_name)
virtual return_get_paths_list get_paths_list_RPC()
virtual bool remove_map_RPC(const std::string &map_name)
virtual return_get_locations_list get_locations_list_RPC()
virtual bool rename_location_RPC(const std::string &original_name, const std::string &new_name)
virtual bool save_locations_and_extras_RPC(const std::string &locations_collection_file)
virtual return_get_all_locations get_all_locations_RPC()
virtual bool save_maps_collection_RPC(const std::string &maps_collection_file)
virtual bool rename_area_RPC(const std::string &original_name, const std::string &new_name)
virtual bool store_area_RPC(const std::string &area_name, const yarp::dev::Nav2D::Map2DArea &area)
virtual bool clear_all_locations_RPC()
virtual bool enable_maps_compression_RPC(const bool enable_compression)
virtual bool delete_area_RPC(const std::string &area_name)
bool getAllLocations(std::vector< yarp::dev::Nav2D::Map2DLocation > &locations) override
Get a list of all stored locations.
bool clearAllLocations() override
Delete all stored locations.
bool saveMapToDisk(std::string map_name, std::string file_name) override
Save a map to disk.
bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map) override
Gets a map from the map server.
bool renameArea(std::string original_name, std::string new_name) override
Searches for an area and renames it.
bool store_map(const yarp::dev::Nav2D::MapGrid2D &map) override
Stores a map into the map server.
bool getArea(std::string location_name, yarp::dev::Nav2D::Map2DArea &area) override
Retrieves an area.
bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) override
Store a path.
bool loadMapFromDisk(std::string file_name) override
Load a map from disk.
bool getLocationsList(std::vector< std::string > &locations) override
Get a list of the names of all stored locations.
bool saveMapsCollection(std::string maps_collection_file) override
Save a collection of maps to disk.
bool renameLocation(std::string original_name, std::string new_name) override
Searches for a location and renames it.
bool getAllPaths(std::vector< yarp::dev::Nav2D::Map2DPath > &paths) override
Get a list of all stored paths.
bool getAllAreas(std::vector< yarp::dev::Nav2D::Map2DArea > &areas) override
Get a list of all stored areas.
bool remove_map(std::string map_name) override
Removes a map from the map server.
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 open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::os::Port m_rpcPort_to_Map2D_nws
bool saveLocationsAndExtras(std::string locations_collection_file) override
Save a collection of locations/area/paths etc to disk.
bool clearAllPaths() override
Delete all stored paths.
bool deleteArea(std::string location_name) override
Delete an area.
bool loadLocationsAndExtras(std::string locations_collection_file) override
Load a collection of locations/areas/paths etc from disk.
bool storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) override
Store an area.
bool clearAllMapsTemporaryFlags() override
Clear all temporary flags from all stored maps.
bool clearAllAreas() override
Delete all stored areas.
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 clearAllMaps() override
Removes all the registered maps from the server.
bool getPathsList(std::vector< std::string > &paths) override
Get a list of the names of all stored paths.
bool deletePath(std::string path_name) override
Delete a path.
bool clearMapTemporaryFlags(std::string map_name) override
Clear all temporary flags from a specific map.
bool loadMapsCollection(std::string maps_collection_file) override
Load a collection of maps from disk.
bool deleteLocation(std::string location_name) override
Delete a location.
bool renamePath(std::string original_name, std::string new_name) override
Searches for a path and renames it.
bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path) override
Retrieves a path.
bool close() override
Close the DeviceDriver.
bool get_map_names(std::vector< std::string > &map_names) override
Gets a list containing the names of all registered maps.
bool getAreasList(std::vector< std::string > &locations) override
Get a list of the names of all stored areas.
bool enableMapsCompression(bool enable) override
99999999999
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
A single value (typically within a Bottle).
virtual std::string asString() const
Get string value.
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.