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>
16#include <yarp/dev/Map2DPath.h>
17#include <vector>
18#include <string>
19
20namespace yarp::dev::Nav2D {
21class IMap2D;
22}
23
30{
31public:
35 virtual ~IMap2D();
36
42
48
53 virtual yarp::dev::ReturnValue get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D& map) = 0;
54
59 virtual yarp::dev::ReturnValue get_map_names(std::vector<std::string>& map_names) = 0;
60
65 virtual yarp::dev::ReturnValue remove_map(std::string map_name) = 0;
66
73 virtual yarp::dev::ReturnValue storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) = 0;
74
81 virtual yarp::dev::ReturnValue storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) = 0;
82
89 virtual yarp::dev::ReturnValue storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) = 0;
90
97 virtual yarp::dev::ReturnValue getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation& loc) = 0;
98
105 virtual yarp::dev::ReturnValue getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea& area) = 0;
106
113 virtual yarp::dev::ReturnValue getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath& path) = 0;
114
120 virtual yarp::dev::ReturnValue getLocationsList(std::vector<std::string>& locations) = 0;
121
127 virtual yarp::dev::ReturnValue getAreasList(std::vector<std::string>& areas) = 0;
128
134 virtual yarp::dev::ReturnValue getPathsList(std::vector<std::string>& paths) = 0;
135
141 virtual yarp::dev::ReturnValue getAllLocations(std::vector<yarp::dev::Nav2D::Map2DLocation>& locations) = 0;
142
148 virtual yarp::dev::ReturnValue getAllAreas(std::vector<yarp::dev::Nav2D::Map2DArea>& areas) = 0;
149
155 virtual yarp::dev::ReturnValue getAllPaths(std::vector<yarp::dev::Nav2D::Map2DPath>& paths) = 0;
156
163 virtual yarp::dev::ReturnValue renameLocation(std::string original_name, std::string new_name) = 0;
164
170 virtual yarp::dev::ReturnValue deleteLocation(std::string location_name) = 0;
171
177 virtual yarp::dev::ReturnValue deletePath(std::string path_name) = 0;
178
185 virtual yarp::dev::ReturnValue renameArea(std::string original_name, std::string new_name) = 0;
186
193 virtual yarp::dev::ReturnValue renamePath(std::string original_name, std::string new_name) = 0;
194
200 virtual yarp::dev::ReturnValue deleteArea(std::string area_name) = 0;
201
207
213
219
225
230 virtual yarp::dev::ReturnValue clearMapTemporaryFlags(std::string map_name) = 0;
231
238 virtual yarp::dev::ReturnValue saveMapToDisk(std::string map_name, std::string file_name) = 0;
239
245 virtual yarp::dev::ReturnValue loadMapFromDisk(std::string file_name) = 0;
246
252 virtual yarp::dev::ReturnValue saveMapsCollection(std::string file_name) = 0;
253
259 virtual yarp::dev::ReturnValue loadMapsCollection(std::string file_name) = 0;
260
266 virtual yarp::dev::ReturnValue saveLocationsAndExtras(std::string file_name) = 0;
267
273 virtual yarp::dev::ReturnValue loadLocationsAndExtras(std::string file_name) = 0;
274
281};
282
283//This section of vocabs is used just by deprecated device Map2DServer and Map2DClient
284//It can be thus safely eliminated as soon as these devices are removed from yarp
297
298#endif // YARP_DEV_IMAP2D_H
constexpr yarp::conf::vocab32_t VOCAB_IMAP_LOAD_X
Definition IMap2D.h:291
constexpr yarp::conf::vocab32_t VOCAB_IMAP_OK
Definition IMap2D.h:295
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SAVE_X
Definition IMap2D.h:292
constexpr yarp::conf::vocab32_t VOCAB_IMAP
Definition IMap2D.h:285
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_MAP
Definition IMap2D.h:287
constexpr yarp::conf::vocab32_t VOCAB_IMAP_SET_MAP
Definition IMap2D.h:286
constexpr yarp::conf::vocab32_t VOCAB_IMAP_LOCATIONS_COLLECTION
Definition IMap2D.h:294
constexpr yarp::conf::vocab32_t VOCAB_IMAP_MAPS_COLLECTION
Definition IMap2D.h:293
constexpr yarp::conf::vocab32_t VOCAB_IMAP_CLEAR_ALL_MAPS
Definition IMap2D.h:289
constexpr yarp::conf::vocab32_t VOCAB_IMAP_ERROR
Definition IMap2D.h:296
constexpr yarp::conf::vocab32_t VOCAB_IMAP_REMOVE
Definition IMap2D.h:290
constexpr yarp::conf::vocab32_t VOCAB_IMAP_GET_NAMES
Definition IMap2D.h:288
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:30
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 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 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 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 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 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 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 getAllAreas(std::vector< yarp::dev::Nav2D::Map2DArea > &areas)=0
Get a list of all stored areas.
virtual yarp::dev::ReturnValue clearAllPaths()=0
Delete all stored paths.
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:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18