YARP
Yet Another Robot Platform
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>
12 #include <yarp/dev/MapGrid2D.h>
13 #include <yarp/dev/Map2DLocation.h>
14 #include <yarp/dev/Map2DArea.h>
15 #include <yarp/dev/Map2DPath.h>
16 #include <vector>
17 #include <string>
18 
19 namespace yarp
20 {
21  namespace dev
22  {
23  namespace Nav2D
24  {
25  class IMap2D;
26  }
27  }
28 }
29 
36 {
37 public:
41  virtual ~IMap2D();
42 
47  virtual bool clearAllMaps () = 0;
48 
53  virtual bool store_map(const yarp::dev::Nav2D::MapGrid2D& map) = 0;
54 
59  virtual bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D& map) = 0;
60 
65  virtual bool get_map_names(std::vector<std::string>& map_names) = 0;
66 
71  virtual bool remove_map(std::string map_name) = 0;
72 
79  virtual bool storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) = 0;
80 
87  virtual bool storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) = 0;
88 
95  virtual bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) = 0;
96 
103  virtual bool getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation& loc) = 0;
104 
111  virtual bool getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea& area) = 0;
112 
119  virtual bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath& path) = 0;
120 
126  virtual bool getLocationsList(std::vector<std::string>& locations) = 0;
127 
133  virtual bool getAreasList(std::vector<std::string>& areas) = 0;
134 
140  virtual bool getPathsList(std::vector<std::string>& paths) = 0;
141 
148  virtual bool renameLocation(std::string original_name, std::string new_name) = 0;
149 
155  virtual bool deleteLocation(std::string location_name) = 0;
156 
162  virtual bool deletePath(std::string path_name) = 0;
163 
170  virtual bool renameArea(std::string original_name, std::string new_name) = 0;
171 
178  virtual bool renamePath(std::string original_name, std::string new_name) = 0;
179 
185  virtual bool deleteArea(std::string area_name) = 0;
186 
191  virtual bool clearAllLocations() = 0;
192 
197  virtual bool clearAllAreas() = 0;
198 
203  virtual bool clearAllPaths() = 0;
204 
209  virtual bool clearAllMapsTemporaryFlags() = 0;
210 
215  virtual bool clearMapTemporaryFlags(std::string map_name) = 0;
216 
221  virtual bool saveMapsCollection(std::string maps_collection_file) = 0;
222 
227  virtual bool loadMapsCollection(std::string maps_collection_file) = 0;
228 
233  virtual bool saveLocationsAndExtras(std::string locations_collection_file) = 0;
234 
239  virtual bool loadLocationsAndExtras(std::string locations_collection_file) = 0;
240 };
241 
254 
255 #endif // YARP_DEV_IMAP2D_H
constexpr yarp::conf::vocab32_t VOCAB_IMAP_LOAD_X
Definition: IMap2D.h:248
constexpr yarp::conf::vocab32_t VOCAB_IMAP_OK
Definition: IMap2D.h:252
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SAVE_X
Definition: IMap2D.h:249
constexpr yarp::conf::vocab32_t VOCAB_IMAP
Definition: IMap2D.h:242
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_MAP
Definition: IMap2D.h:244
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SET_MAP
Definition: IMap2D.h:243
constexpr yarp::conf::vocab32_t VOCAB_IMAP_LOCATIONS_COLLECTION
Definition: IMap2D.h:251
constexpr yarp::conf::vocab32_t VOCAB_IMAP_MAPS_COLLECTION
Definition: IMap2D.h:250
constexpr yarp::conf::vocab32_t VOCAB_IMAP_CLEAR_ALL_MAPS
Definition: IMap2D.h:246
constexpr yarp::conf::vocab32_t VOCAB_IMAP_ERROR
Definition: IMap2D.h:253
constexpr yarp::conf::vocab32_t VOCAB_IMAP_REMOVE
Definition: IMap2D.h:247
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_NAMES
Definition: IMap2D.h:245
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
contains the definition of a Map2DPath type
contains the definition of a map type
IMap2D Interface.
Definition: IMap2D.h:36
virtual bool deleteLocation(std::string location_name)=0
Delete a location.
virtual bool loadLocationsAndExtras(std::string locations_collection_file)=0
Load a collection of locations/areas/paths etc.
virtual bool deletePath(std::string path_name)=0
Delete a path.
virtual bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map)=0
Gets a map from the map server.
virtual bool deleteArea(std::string area_name)=0
Delete an area.
virtual bool storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area)=0
Store an area.
virtual bool remove_map(std::string map_name)=0
Removes a map from the map server.
virtual bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path)=0
Store a path.
virtual bool clearAllPaths()=0
Delete all stored paths.
virtual bool clearAllAreas()=0
Delete all stored areas.
virtual bool storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc)=0
Store a location specified by the user in the world reference frame.
virtual bool getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation &loc)=0
Retrieves a location specified by the user in the world reference frame.
virtual bool loadMapsCollection(std::string maps_collection_file)=0
Load a collection of maps.
virtual bool store_map(const yarp::dev::Nav2D::MapGrid2D &map)=0
Stores a map into the map server.
virtual bool clearAllLocations()=0
Delete all stored locations.
virtual bool clearAllMapsTemporaryFlags()=0
Clear all temporary flags from all stored maps.
virtual bool saveLocationsAndExtras(std::string locations_collection_file)=0
Save a collection of locations/area/paths etc.
virtual bool get_map_names(std::vector< std::string > &map_names)=0
Gets a list containing the names of all registered maps.
virtual ~IMap2D()
Destructor.
virtual bool renameArea(std::string original_name, std::string new_name)=0
Searches for an area and renames it.
virtual bool getPathsList(std::vector< std::string > &paths)=0
Get a list of all stored paths.
virtual bool clearAllMaps()=0
Removes all the registered maps from the server.
virtual bool clearMapTemporaryFlags(std::string map_name)=0
Clear all temporary flags from a specific map.
virtual bool renamePath(std::string original_name, std::string new_name)=0
Searches for a path and renames it.
virtual bool getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea &area)=0
Retrieves an area.
virtual bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path)=0
Retrieves a path.
virtual bool saveMapsCollection(std::string maps_collection_file)=0
Save a collection of maps.
virtual bool renameLocation(std::string original_name, std::string new_name)=0
Searches for a location and renames it.
virtual bool getLocationsList(std::vector< std::string > &locations)=0
Get a list of all stored locations.
virtual bool getAreasList(std::vector< std::string > &areas)=0
Get a list of all stored areas.
std::int32_t vocab32_t
Definition: numeric.h:78
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition: Vocab.h:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18