SLAMcore Scripts

The scripts are installed via the SLAMcore C++ API package for your chosen platforms. There is one script available:

  • plot_trajectory.py

Plot Trajectory

plot_trajectory.py is a simple script that allows plotting and visualisation of the 3D trajectories exported from SLAMcore software.

_images/script_plot_trajectory_example.png

Fig. 16 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 interactive with the plot using the UI buttons for matplotlib.

Command-Line Options

At start-up, the SLAMcore Dataset Processor accepts the following command-line options:

-h,--help

show this help message and exit

trajectory_file

the path to the SLAMcore trajectory CSV files to plot