YARP
Yet Another Robot Platform
IMap2D.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IMAP2D_H
10 #define YARP_DEV_IMAP2D_H
11 
12 #include <yarp/os/Vocab.h>
13 #include <yarp/sig/Image.h>
14 #include <yarp/dev/api.h>
15 #include <yarp/dev/MapGrid2D.h>
16 #include <yarp/dev/Map2DLocation.h>
17 #include <yarp/dev/Map2DArea.h>
18 #include <yarp/dev/Map2DPath.h>
19 #include <vector>
20 #include <string>
21 
22 namespace yarp
23 {
24  namespace dev
25  {
26  namespace Nav2D
27  {
28  class IMap2D;
29  }
30  }
31 }
32 
39 {
40 public:
44  virtual ~IMap2D();
45 
50  virtual bool clearAllMaps () = 0;
51 
56  virtual bool store_map(const yarp::dev::Nav2D::MapGrid2D& map) = 0;
57 
62  virtual bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D& map) = 0;
63 
68  virtual bool get_map_names(std::vector<std::string>& map_names) = 0;
69 
74  virtual bool remove_map(std::string map_name) = 0;
75 
82  virtual bool storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) = 0;
83 
90  virtual bool storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) = 0;
91 
98  virtual bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) = 0;
99 
106  virtual bool getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation& loc) = 0;
107 
114  virtual bool getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea& area) = 0;
115 
122  virtual bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath& path) = 0;
123 
129  virtual bool getLocationsList(std::vector<std::string>& locations) = 0;
130 
136  virtual bool getAreasList(std::vector<std::string>& areas) = 0;
137 
143  virtual bool getPathsList(std::vector<std::string>& paths) = 0;
144 
151  virtual bool renameLocation(std::string original_name, std::string new_name) = 0;
152 
158  virtual bool deleteLocation(std::string location_name) = 0;
159 
165  virtual bool deletePath(std::string path_name) = 0;
166 
173  virtual bool renameArea(std::string original_name, std::string new_name) = 0;
174 
181  virtual bool renamePath(std::string original_name, std::string new_name) = 0;
182 
188  virtual bool deleteArea(std::string area_name) = 0;
189 
194  virtual bool clearAllLocations() = 0;
195 
200  virtual bool clearAllAreas() = 0;
201 
206  virtual bool clearAllPaths() = 0;
207 };
208 
219 
220 #endif // YARP_DEV_IMAP2D_H
VOCAB_IMAP_SET_MAP
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SET_MAP
Definition: IMap2D.h:210
VOCAB_IMAP_REMOVE
constexpr yarp::conf::vocab32_t VOCAB_IMAP_REMOVE
Definition: IMap2D.h:214
yarp::dev::Nav2D::IMap2D::clearAllLocations
virtual bool clearAllLocations()=0
Delete all stored locations.
MapGrid2D.h
contains the definition of a map type
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
yarp::dev::Nav2D::IMap2D::getLocationsList
virtual bool getLocationsList(std::vector< std::string > &locations)=0
Get a list of all stored locations.
yarp::dev::Nav2D::IMap2D
IMap2D Interface.
Definition: IMap2D.h:39
Map2DArea.h
contains the definition of a Map2DArea type
yarp::dev::Nav2D::IMap2D::get_map_names
virtual bool get_map_names(std::vector< std::string > &map_names)=0
Gets a list containing the names of all registered maps.
yarp::dev::Nav2D::IMap2D::deleteArea
virtual bool deleteArea(std::string area_name)=0
Delete an area.
yarp::dev::Nav2D::IMap2D::clearAllMaps
virtual bool clearAllMaps()=0
Removes all the registered maps from the server.
VOCAB_IMAP_GET_MAP
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_MAP
Definition: IMap2D.h:211
VOCAB_IMAP_GET_NAMES
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_NAMES
Definition: IMap2D.h:212
yarp::dev::Nav2D::IMap2D::renameArea
virtual bool renameArea(std::string original_name, std::string new_name)=0
Searches for an area and renames it.
yarp::dev::Nav2D::IMap2D::remove_map
virtual bool remove_map(std::string map_name)=0
Removes a map from the map server.
yarp::dev::Nav2D::IMap2D::clearAllAreas
virtual bool clearAllAreas()=0
Delete all stored areas.
yarp::dev::Nav2D::IMap2D::get_map
virtual bool get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D &map)=0
Gets a map from the map server.
VOCAB_IMAP_LOAD_COLLECTION
constexpr yarp::conf::vocab32_t VOCAB_IMAP_LOAD_COLLECTION
Definition: IMap2D.h:215
yarp::dev::Nav2D::IMap2D::~IMap2D
virtual ~IMap2D()
Destructor.
yarp::dev::Nav2D::IMap2D::getPath
virtual bool getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath &path)=0
Retrieves a path.
yarp::dev::Nav2D::MapGrid2D
Definition: MapGrid2D.h:32
yarp::dev::Nav2D::IMap2D::getPathsList
virtual bool getPathsList(std::vector< std::string > &paths)=0
Get a list of all stored paths.
yarp::dev::Nav2D::IMap2D::store_map
virtual bool store_map(const yarp::dev::Nav2D::MapGrid2D &map)=0
Stores a map into the map server.
yarp::dev::Nav2D::IMap2D::storePath
virtual bool storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path)=0
Store a path.
Map2DLocation.h
contains the definition of a Map2DLocation type
yarp::dev::Nav2D::IMap2D::getAreasList
virtual bool getAreasList(std::vector< std::string > &areas)=0
Get a list of all stored areas.
yarp::dev::Nav2D::IMap2D::renameLocation
virtual bool renameLocation(std::string original_name, std::string new_name)=0
Searches for a location and renames it.
yarp::dev::Nav2D::Map2DPath
Definition: Map2DPath.h:27
yarp::dev::Nav2D::IMap2D::storeLocation
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.
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
VOCAB_IMAP_CLEAR
constexpr yarp::conf::vocab32_t VOCAB_IMAP_CLEAR
Definition: IMap2D.h:213
yarp::dev::Nav2D::IMap2D::renamePath
virtual bool renamePath(std::string original_name, std::string new_name)=0
Searches for a path and renames it.
yarp::dev::Nav2D::IMap2D::getArea
virtual bool getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea &area)=0
Retrieves an area.
yarp::dev::Nav2D::Map2DLocation
Definition: Map2DLocation.h:30
Image.h
yarp::dev::Nav2D::IMap2D::deletePath
virtual bool deletePath(std::string path_name)=0
Delete a path.
Map2DPath.h
contains the definition of a Map2DPath type
VOCAB_IMAP_OK
constexpr yarp::conf::vocab32_t VOCAB_IMAP_OK
Definition: IMap2D.h:217
VOCAB_IMAP_SAVE_COLLECTION
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SAVE_COLLECTION
Definition: IMap2D.h:216
VOCAB_IMAP_ERROR
constexpr yarp::conf::vocab32_t VOCAB_IMAP_ERROR
Definition: IMap2D.h:218
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
Vocab.h
yarp::dev::Nav2D::IMap2D::clearAllPaths
virtual bool clearAllPaths()=0
Delete all stored paths.
yarp::dev::Nav2D::Map2DArea
Definition: Map2DArea.h:30
yarp::dev::Nav2D::IMap2D::deleteLocation
virtual bool deleteLocation(std::string location_name)=0
Delete a location.
yarp::dev::Nav2D::IMap2D::getLocation
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.
api.h
VOCAB_IMAP
constexpr yarp::conf::vocab32_t VOCAB_IMAP
Definition: IMap2D.h:209
yarp::dev::Nav2D::IMap2D::storeArea
virtual bool storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area)=0
Store an area.