SLAMcore CLI

The SLAMcore command line tools are installed via the SLAMcore Tools package for your chosen platforms. There are two CLI applications: slamcore_dataset_recorder_cli and slamcore_dataset_processor.

Note

Run the tool(s) with --help-all for more information and options.

Dataset Recorder CLI

To record a dataset using your camera without using a GUI, run the following from a terminal window:

$ slamcore_dataset_recorder_cli -o <output/directory>

Ctrl + c to stop recording.

Command-Line Options

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

-h,--help

Print this help message and exit

--help-all

Expand all help

-v,--version

Display the version

-c,--config-file :FILE ...

Path to the configuration file(s)

-o,--output-dir REQUIRED

Path to the directory to generate the recorded dataset

RealSense Subcommand Options

The realsense subcommand specifies for the SLAMcore Dataset Recorder to use the RealSense camera. It is optional to use but the following options only apply to RealSense cameras.

--dev,--device

Integer device index for multiple reader types

--color,--no-color{false}

Enable (1) or disable (0) the colour stream (Contact support@slamcore.com to enable this feature on your SLAMcore account.)

--depth,--no-depth{false}

Enable (1) or disable (0) the depth stream (See FAQs for detailed explanation)

--ir,--no-ir{false}

Enable (1) or disable (0) the infrared stream

--fps

Override reader’s FPS (See FAQs for options)

Mynteye2 Subcommand Options

The mynteye2 subcommand specifies for the SLAMcore Dataset Recorder to use the Mynteye2 camera. It is optional to use but the following options only apply to Mynteye2 cameras.

--dev,--device

Integer device index for multiple reader types

--fps

Override reader’s FPS (See FAQs for options)

Dataset Processor

The dataset processor is a command line tool that generates a session map from the SLAM run and saves the trajectories in CSV files, without using a GUI. This allows for more systematic evaluation of our tracking/positioning system. The optimised and unoptimised trajectories are recorded in two separate CSV files (more details in the Guide to Trajectories).

SLAM Mode

Live Camera

To run in live SLAM mode, where a sparse map is built on the go, from the terminal window run:

$ slamcore_dataset_processor -o <output/directory> -s

Ctrl + c to stop the SLAM session. A session file and the optimised and unoptimised trajectories will be saved in the specified output directory.

If no -s flag is provided, no session file will be generated.

Note

The optimised trajectories differ when the -s flag is and isn’t provided when saving a session.

SLAM using a recorded dataset

To run the dataset processor on a prerecorded dataset, use the dataset subcommand and specify the dataset to use with the -u flag.

$ slamcore_dataset_processor dataset -u <path/to/dataset> -o <output/directory> -s

Localisation Mode

Note

In localisation mode, no optimised trajectory or session file will be generated, only a CSV file of the unoptimised trajectory.

Live Localisation

To run the dataset processor on a previously created map, load a session file with the -l flag.

$ slamcore_dataset_processor -l <path/to/session/file> -o <output/directory>

Localisation using a recorded dataset

To run SLAM on a recorded dataset using a previously created map, use the dataset subcommand, specify the dataset and session file to use with the -u and -l flag respectively.

$ slamcore_dataset_processor dataset -u <path/to/dataset> -l <path/to/session/file> -o <output/directory>

Height Mapping Mode

Live Mapping

To generate a height map with a live camera feed, enable session saving and map generation with the -s and -m flags respectively:

$ slamcore_dataset_processor -m -s -o <output/directory>

Mapping using a prerecorded dataset

To generate a height/occupancy map from a dataset that contains depth information, run:

$ slamcore_dataset_processor dataset -u <path/to/dataset> -m -s -o <output/directory>

Command-Line Options

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

-h,--help

Print this help message and exit

--help-all

Expand all help

-v,--version

Display the version

-c,--config-file :FILE ...

Path to the configuration file(s)

-l,--load-session :FILE

Path to the session file to load

-o,--output-dir DIR REQUIRED

Path to output directory

-s,--save-session Excludes: --load-session

Generate session (“-s” to enable)

-m,--generate-map2d

Produce a new 2D map

Dataset Subcommand Options

The dataset subcommand allows dataset processing via the SLAMcore Dataset Processor tool.

$ slamcore_dataset_processor dataset -u <path/to/dataset> -o <output/directory> -s
-u,--euroc-dataset :DIR

Dataset reader path

--ts,--timescale FLOAT

Timescale for dataset reader, for real time processing set to 1.0

RealSense Subcommand Options

The realsense subcommand specifies for the SLAMcore Dataset Processor to use the RealSense camera when running live. It is optional to use but the following options only apply to RealSense cameras.

--dev,--device

Integer device index for multiple reader types

--color,--no-color{false}

Enable (1) or disable (0) the colour stream (Contact support@slamcore.com to enable this feature on your SLAMcore account.)

--depth,--no-depth{false}

Enable (1) or disable (0) the depth stream (See FAQs for detailed explanation)

--ir,--no-ir{false}

Enable (1) or disable (0) the infrared stream

--fps

Override reader’s FPS (See FAQs for options)

Mynteye2 Subcommand Options

The mynteye2 subcommand specifies for the SLAMcore Dataset Processor to use the Mynteye2 camera when running live. It is optional to use but the following options only apply to Mynteye2 cameras.

--dev,--device

Integer device index for multiple reader types

--fps

Override reader’s FPS (See FAQs for options)