Slamcore Scripts
The scripts are installed via the Slamcore C++ API package for your chosen platforms. There are two scripts available:
plot_trajectory.py
plot_map.py
Plot Trajectory
plot_trajectory.py
is a simple script that allows plotting and
visualisation of the 3D trajectories exported from Slamcore software.

Fig. 17 Plot Trajectory Script
Dependencies
The Python3 script uses the matplotlib
and numpy
library. To install
these dependencies, first ensure Python and pip are installed on your system.
# check Python version and installation
$ python --version
# check pip
$ pip -V
# install Matplotlib
$ pip install matplotlib
# install numpy
$ pip install numpy
Usage
To plot trajectories, run the following:
$ python /usr/src/slamcore/examples/plot_trajectory.py <path/to/CSV/file/1>
<path/to/CSV/file/2> ...
You may save or interact with the plot using the UI buttons for matplotlib
.
Plot Map
plot_map.py
is a simple script that allows plotting and visualisation of the
occupancy map .txt file exported from Slamcore software.

Fig. 18 Plot Map Script
Dependencies
The Python3 script uses the matplotlib
and numpy
library. To install
these dependencies, first ensure Python and pip are installed on your system.
# check Python version and installation
$ python --version
# check pip
$ pip -V
# install Matplotlib
$ pip install matplotlib
# install numpy
$ pip install numpy
Usage
First generate a map in .txt
format using the
write_map c++ example:
$ ./write_map <dataset/path> <output/txt/file> [<config/file>]
This will generate a .txt
file containing the pixel values of the occupancy map.
To plot the map with the python script, run the following:
$ python /usr/src/slamcore/examples/plot_map.py <path/to/txt/file/>
You may save or interactive with the plot using the UI buttons for matplotlib
.