You’re reading an older version of the Slamcore SDK documenation. The latest one is 23.04.
The SLAMcore Visualiser is a tool that provides a 3D interface for evaluating the behaviour of the visual-inertial tracking system in real time. It can be used to view:
A 3D plot of the trajectory.
A 3D plot of the features in the map.
Live state info of the camera position and orientation, tracking status and number of features in the map.
A camera feed with feature detection overlaid (picture-in-picture).
Plug in the camera to a USB 3 port on your computer.
From a terminal window, run:
The software automatically detects the type of camera that is plugged in. In case multiple cameras of the same type are plugged in it will arbitrarily select one. If, on the other hand you have both RealSense D435i and Mynteye2 cameras connected, the Mynteye2 will have higher priority.
This behaviour is consistent across all the SLAM client applications (i.e. the SLAMcore Visualiser, the SLAMcore Dataset Recorder, the SLAMcore CLI, the SLAMcore ROS1 Wrapper and the SLAMcore ROS2 Wrapper).
See the Troubleshooting page to help diagnose common errors.
The SLAMcore Visualiser supports processing from datasets. To start the Visualiser to process a dataset run the following command:
$ slamcore_visualiser dataset -u <path/to/dataset/>
SLAM, Localisation, Mapping and Odometry Mode
There are four main ways to run our system:
A sparse map is built on the go, without any prior knowledge about the environment.
Use a sparse map previously created in SLAM mode.
Build a height and occupancy map for autonomous navigation.
Positioning without using a map. See Positioning Mode to use this mode.
By default, the system is configured to run in SLAM mode. To run in live SLAM
mode just press the
START button, and start moving the camera. An example of
a SLAM run is shown in the image below.
To generate a session map, click on the
GENERATE button, select a location
to save the session file, and press
GENERATE will automatically stop the SLAM system. A progress bar will be
displayed informing you about the status of session generation and saving.
Depending on the size of the map as well as the length of the trajectory, generating a session can take several minutes.
Once the session has been written to disk, the application will display a pop-up with the path to the saved map, as in the figure below.
After saving a map, the SLAM run may be continued by clicking on the
In localisation mode, our system localises against a previously created map that
was saved in a session file.
To run in this mode, load a session file using the
LOAD button and press
The visualisation in the localisation mode differs from the one in SLAM mode.
There are three main components as shown in the image below:
The loaded sparse map is displayed in grey;
temporary landmarks used for tracking not present in the loaded map are shown in red; and
landmarks that are currently recognised from the map are visualised in cyan.
RESET will clear the map and configure the system to run in SLAM mode.
Height Mapping Mode
In height mapping mode, our system runs in SLAM mode but also generates a height map and an occupancy map which can be used in autonomous navigation.
See the 2D Occupancy Mapping tutorial for a detailed walkthrough of the mapping feature.
To run in this mode, launch the Visualiser with the
--generate-map2d flag, with depth stream enabled:
$ slamcore_visualiser -m
START button and move the camera around to begin mapping.
R key on the keyboard or select
Show Right Sidebar
to reveal visualisation options. Under the “2D Map” field is displayed, switch
between “Height Map” and “Occupancy Map” to view the 2D/3D height map or the
To generate and save a session map, click on the
GENERATE button, select a
location to save the session file, and press
The 2D map visualised may not be representative of the final map produced as further optimisation is carried out during session generation.
For each run, the SLAM trajectory may be exported as two CSV files for future analysis (unoptimised and optimised trajectory).
To do so, click on the
EXPORT button at any point of the run, select a
location to save the trajectory files and press
OK. See Guide to Trajectories
for more information about the trajectories.
On the left is a panel which shows the instantaneous state of the system, such as:
Current position away from origin (the position at the start of the run),
Current orientation (in Euler angles) with respect to that at the origin,
Time elapsed since the start of the run,
Current frame rate,
Number of dropped frames, landmarks and features,
Below this are the controls to
RESETthe tracking. Under the “Session” section are the buttons to
LOADa session. Under the “Trajectory” section is the button to
EXPORTthe optimised and unoptimised trajectories.
To the right is the 3D view. Initially this only displays a grid to represent the ground plane and an origin gizmo. When the tracking is running the following are also visible:
Pose displayed as three-dimensional axes,
Cameras displayed as pyramids,
Trajectory displayed as a yellow line,
Sparse map landmarks displayed as points in the 3D space,
Local point cloud also displayed as points in the 3D space,
2D map, displaying the height map or occupancy map.
The visibility of these items can be toggled using the options under the button and the Right Sidebar (hit the
Rkey on the keyboard).
The visualisation perspective of the 3D view can be changed under the button to Top Down or First Person View. Chase mode can also be enabled to follow the camera such that the camera frame is always at the centre of the window.
3D Camera Controls
To control the position and orientation of the 3D view in the application, use the mouse or trackpad.
The view can be rotated by holding down the left mouse button while hovering over the 3D window. Moving the mouse up and down will then tilt the view while a left/right movement will rotate the view around a point central to the window.
The view can be panned around in 3D space by holding down the right mouse button.
The view can be moved directly forwards and backwards by using the mouse wheel or the scroll region of the trackpad.
At start-up, the SLAMcore Visualiser accepts the following command-line options:
Print this help message and exit
Expand all help
Display the version
- -c,--config-file :FILE ...
Path to the configuration file(s)
- -l,--load-session :FILE
Path to the session file to load
Produce a new 2D map
Dataset Subcommand Options
dataset subcommand allows dataset processing via the SLAMcore Visualiser tool.
- -u,--euroc-dataset :DIR
Dataset reader path
- --ts,--timescale FLOAT
Timescale for dataset reader, for real time processing set to 1.0
$ slamcore_visualiser dataset -u <path/to/dataset/>
RealSense Subcommand Options
The following options only apply to RealSense cameras.
Detect RealSense camera
Integer device index for multiple reader types
Enable or disable the colour stream
Enable or disable the infrared stream