Repository navigation
Basic Console Usage
Install MapLab and make sure to compile the console:
cd ~/catkin_ws
catkin build maplabMake sure that your development environment is correctly sourced:
source ~/catkin_ws/devel/setup.bashYou can now launch the MapLab console with
rosrun maplab_console maplab_consoleThis command requires a running roscore for visualization.
If the program gets stuck looking for the roscore, you can abort the search with Ctrl-C.
(You can start a roscore with roscore&.)
If you want to start MapLab in a ros-free environment, you can use the rosfree flag:
rosrun maplab maplab --ros_freeYou should now be greeted with the MapLab console prompt:

The console supports tab completion and a command history, which can be accessed with the arrow keys or Ctrl-P and Ctrl-N.
MapLab can have multiple maps loaded in its database at the same time. Each map has a unique name, called the map key. The command prompt indicates the currently selected map inside the orange brackets (if there's no content in the brackets, then no map is currently active). All commands operate on the selected map.
You can create a new, empty map with the key my_empty_key using
create_new_map --map_key my_empty_key
Note that map keys can only contain alphanumeric characters as well as hyphen (-) and underscore (_) characters. Other characters are disallowed.
You can also load a map from the file system. To load the map included in the test data repository, you can use
load --map_folder ~/catkin_ws/src/maplab/tools/maplab_test_data/test_maps/vi_app_test/
Note: the folder vi_map, in which the actual map data is stored, doesn't need to be specified.
By default, the map key is automatically generated from the path, in this case the key will be vi_app_test.
You can manually define the key under which the map should be stored in MapLab by using the map_key flag when using load.
After loading or creating a new map, MapLab automatically change the selected map to the new map.
After doing the two operations, your console output should look like this:

Notice, how after the load operation, the loaded map (with the key vi_app_test) has automatically been selected.
You can use the ms (map statistics) command to get information about the selected map.
In the case of the vi_app_test map, the output of ms should look like this:
VI-Map:
Mission 0: c7957efb9cf29d4874676106d6beb551 Viwls
Vertices: 405
Landmarks: 8359
Landmarks by first observer backlink:
Camera 0: 8359 (g:0 b:0 u:8359)
Observations: 174464
Distance travelled [m]: 23.406851
Start to end time: 1970_01_01_03_13_13 to 1970_01_01_03_13_53
T_G_M unknown
To visualize a map, use the v (visualize) command.
You can then look at the map in rviz.
Make sure you have a roscore running and start rviz in a new terminal with
rosrun rviz rvizOn the left side, click the Add button and select the data you want to visualize.
Selecting Marker from vi_map_edges and PointCloud2 from vi_map_landmarks (both in the by topic tab), should give you a view similar to this:

Use ls to list all maps that are loaded in the current MapLab session.
The selected map will be highlighted in green.

ls lists all map keys and shows the map's respective map folder next to here.
Check out TODO to learn more about the map folder.
To change the selected map, use the select command. E.g. you can do
select --map_key my_empty_map
Note that the map key in the orange brackets should change to show the newly selected map:

To get information about the available commands, you can use the help command.
When no argument is provided, help will list all installed plugins and tell you how to get more help.

-
Use
help --allto get a description of all available commands. -
Use
help --plugin <plugin_name>to get a description of the commands provided by the pluginplugin_name. E.g., typehelp --plugin consoleto see the commands provided by theconsoleplugin:
-
Use
help --command_filter <search_term>to search all command names and descriptions forsearch_term. You can optionally add thepluginflag to limit the search to commands provied by a given plugin.
To exit MapLab, you can type q or exit.