YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IMap2D.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IMAP2D_H
7#define YARP_DEV_IMAP2D_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/sig/Image.h>
11#include <yarp/dev/api.h>
13#include <yarp/dev/MapGrid2D.h>
15#include <yarp/dev/Map2DArea.h>
17#include <yarp/dev/Map2DPath.h>
18#include <vector>
19#include <string>
20
21namespace yarp::dev::Nav2D {
22class IMap2D;
23}
24
31{
32public:
36 virtual ~IMap2D();
37
43
49
54 virtual yarp::dev::ReturnValue get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D& map) = 0;
55
60 virtual yarp::dev::ReturnValue get_map_names(std::vector<std::string>& map_names) = 0;
61
66 virtual yarp::dev::ReturnValue remove_map(std::string map_name) = 0;
67
74 virtual yarp::dev::ReturnValue storeObject(std::string object_name, yarp::dev::Nav2D::Map2DObject obj) = 0;
75
82 virtual yarp::dev::ReturnValue storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) = 0;
83
90 virtual yarp::dev::ReturnValue storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) = 0;
91
98 virtual yarp::dev::ReturnValue storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) = 0;
99
106 virtual yarp::dev::ReturnValue getObject(std::string object_name, yarp::dev::Nav2D::Map2DObject& obj) = 0;
107
114 virtual yarp::dev::ReturnValue getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation& loc) = 0;
115
122 virtual yarp::dev::ReturnValue getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea& area) = 0;
123
130 virtual yarp::dev::ReturnValue getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath& path) = 0;
131
137 virtual yarp::dev::ReturnValue getObjectsList(std::vector<std::string> & objects) = 0;
138
144 virtual yarp::dev::ReturnValue getLocationsList(std::vector<std::string>& locations) = 0;
145
151 virtual yarp::dev::ReturnValue getAreasList(std::vector<std::string>& areas) = 0;
152
158 virtual yarp::dev::ReturnValue getPathsList(std::vector<std::string>& paths) = 0;
159
165 virtual yarp::dev::ReturnValue getAllObjects(std::vector<yarp::dev::Nav2D::Map2DObject>& obj) = 0;
166
172 virtual yarp::dev::ReturnValue getAllLocations(std::vector<yarp::dev::Nav2D::Map2DLocation>& locations) = 0;
173
179 virtual yarp::dev::ReturnValue getAllAreas(std::vector<yarp::dev::Nav2D::Map2DArea>& areas) = 0;
180
186 virtual yarp::dev::ReturnValue getAllPaths(std::vector<yarp::dev::Nav2D::Map2DPath>& paths) = 0;
187
194 virtual yarp::dev::ReturnValue renameObject(std::string original_name, std::string new_name) = 0;
195
202 virtual yarp::dev::ReturnValue renameLocation(std::string original_name, std::string new_name) = 0;
203
209 virtual yarp::dev::ReturnValue deleteObject(std::string object_name) = 0;
210
216 virtual yarp::dev::ReturnValue deleteLocation(std::string location_name) = 0;
217
223 virtual yarp::dev::ReturnValue deletePath(std::string path_name) = 0;
224
231 virtual yarp::dev::ReturnValue renameArea(std::string original_name, std::string new_name) = 0;
232
239 virtual yarp::dev::ReturnValue renamePath(std::string original_name, std::string new_name) = 0;
240
246 virtual yarp::dev::ReturnValue deleteArea(std::string area_name) = 0;
247
253
259
265
271
277
282 virtual yarp::dev::ReturnValue clearMapTemporaryFlags(std::string map_name) = 0;
283
290 virtual yarp::dev::ReturnValue saveMapToDisk(std::string map_name, std::string file_name) = 0;
291
297 virtual yarp::dev::ReturnValue loadMapFromDisk(std::string file_name) = 0;
298
304 virtual yarp::dev::ReturnValue saveMapsCollection(std::string file_name) = 0;
305
311 virtual yarp::dev::ReturnValue loadMapsCollection(std::string file_name) = 0;
312
318 virtual yarp::dev::ReturnValue saveLocationsAndExtras(std::string file_name) = 0;
319
325 virtual yarp::dev::ReturnValue loadLocationsAndExtras(std::string file_name) = 0;
326
332
338
345};
346
347#endif // YARP_DEV_IMAP2D_H
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
contains the definition of a Map2DObject type
contains the definition of a Map2DPath type
contains the definition of a map type
IMap2D Interface.
Definition IMap2D.h:31
virtual yarp::dev::ReturnValue storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc)=0
Store a location specified by the user in the world reference frame.
virtual yarp::dev::ReturnValue storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path)=0
Store a path.
virtual yarp::dev::ReturnValue deleteLocation(std::string location_name)=0
Delete a location.
virtual yarp::dev::ReturnValue reloadLocationsAndExtras()=0
Reloads the last opened file containing the collection of locations/areas/paths etc from disk.
virtual yarp::dev::ReturnValue get_map_names(std::vector< std::string > &map_names)=0
Gets a list containing the names of all registered maps.
virtual yarp::dev::ReturnValue loadMapsCollection(std::string file_name)=0
Load a collection of maps from disk.
virtual yarp::dev::ReturnValue saveMapsCollection(std::string file_name)=0
Save a collection of maps to disk.
virtual yarp::dev::ReturnValue getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path)=0
Retrieves a path.
virtual yarp::dev::ReturnValue renamePath(std::string original_name, std::string new_name)=0
Searches for a path and renames it.
virtual yarp::dev::ReturnValue saveLocationsAndExtras(std::string file_name)=0
Save a collection of locations/area/paths etc to disk.
virtual yarp::dev::ReturnValue getAllObjects(std::vector< yarp::dev::Nav2D::Map2DObject > &obj)=0
Get a list of all stored objects.
virtual yarp::dev::ReturnValue deleteArea(std::string area_name)=0
Delete an area.
virtual yarp::dev::ReturnValue getLocationsList(std::vector< std::string > &locations)=0
Get a list of the names of all stored locations.
virtual yarp::dev::ReturnValue loadLocationsAndExtras(std::string file_name)=0
Load a collection of locations/areas/paths etc from disk.
virtual yarp::dev::ReturnValue store_map(const yarp::dev::Nav2D::MapGrid2D &map)=0
Stores a map into the map server.
virtual yarp::dev::ReturnValue renameObject(std::string original_name, std::string new_name)=0
Searches for a object and renames it.
virtual yarp::dev::ReturnValue clearAllMaps()=0
Removes all the registered maps from the server.
virtual yarp::dev::ReturnValue clearAllMapsTemporaryFlags()=0
Clear all temporary flags from all stored maps.
virtual yarp::dev::ReturnValue clearMapTemporaryFlags(std::string map_name)=0
Clear all temporary flags from a specific map.
virtual yarp::dev::ReturnValue clearAllAreas()=0
Delete all stored areas.
virtual yarp::dev::ReturnValue storeObject(std::string object_name, yarp::dev::Nav2D::Map2DObject obj)=0
Store a object specified by the user in the world reference frame.
virtual yarp::dev::ReturnValue renameLocation(std::string original_name, std::string new_name)=0
Searches for a location and renames it.
virtual ~IMap2D()
Destructor.
virtual yarp::dev::ReturnValue get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map)=0
Gets a map from the map server.
virtual yarp::dev::ReturnValue getAllLocations(std::vector< yarp::dev::Nav2D::Map2DLocation > &locations)=0
Get a list of all stored locations.
virtual yarp::dev::ReturnValue getAreasList(std::vector< std::string > &areas)=0
Get a list of the names of all stored areas.
virtual yarp::dev::ReturnValue storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area)=0
Store an area.
virtual yarp::dev::ReturnValue loadMapFromDisk(std::string file_name)=0
Load a map from disk.
virtual yarp::dev::ReturnValue enableMapsCompression(bool enable)=0
Enable/disables maps compression over the network.
virtual yarp::dev::ReturnValue clearAllLocations()=0
Delete all stored locations.
virtual yarp::dev::ReturnValue saveMapToDisk(std::string map_name, std::string file_name)=0
Save a map to disk.
virtual yarp::dev::ReturnValue getPathsList(std::vector< std::string > &paths)=0
Get a list of the names of all stored paths.
virtual yarp::dev::ReturnValue getAllPaths(std::vector< yarp::dev::Nav2D::Map2DPath > &paths)=0
Get a list of all stored paths.
virtual yarp::dev::ReturnValue getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea &area)=0
Retrieves an area.
virtual yarp::dev::ReturnValue deleteObject(std::string object_name)=0
Delete an object.
virtual yarp::dev::ReturnValue deletePath(std::string path_name)=0
Delete a path.
virtual yarp::dev::ReturnValue remove_map(std::string map_name)=0
Removes a map from the map server.
virtual yarp::dev::ReturnValue renameArea(std::string original_name, std::string new_name)=0
Searches for an area and renames it.
virtual yarp::dev::ReturnValue getObject(std::string object_name, yarp::dev::Nav2D::Map2DObject &obj)=0
Retrieves a object specified by the user in the world reference frame.
virtual yarp::dev::ReturnValue getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation &loc)=0
Retrieves a location specified by the user in the world reference frame.
virtual yarp::dev::ReturnValue getObjectsList(std::vector< std::string > &objects)=0
Get a list of the names of all stored objects.
virtual yarp::dev::ReturnValue getAllAreas(std::vector< yarp::dev::Nav2D::Map2DArea > &areas)=0
Get a list of all stored areas.
virtual yarp::dev::ReturnValue reloadMapsCollection()=0
Reloads the last opened file containing the maps from disk.
virtual yarp::dev::ReturnValue clearAllObjects()=0
Delete all stored objects.
virtual yarp::dev::ReturnValue clearAllPaths()=0
Delete all stored paths.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18