User Tools

Site Tools


datasets:create

This is an old revision of the document!


Algorithm Creation

How to create dataset in SLAM-Hive System.

Full Version

1. Provide Dataset Sequence with Running Script

You should have your dataset sequence at /SLAM-Hive/slam_hive_datasets/xxx, and provide a running script to play the dataset.

We provide a script example for reference:

import yaml 
import subprocess
config_raw = open("/slamhive/config.yaml",'r',encoding="UTF-8").read()
config_dict = yaml.load(config_raw, Loader=yaml.FullLoader)
remap_dict = config_dict["dataset-remap"]
topic_list = ["/cam0/image_raw",
            "/cam1/image_raw",
            "/imu0",
            "/leica/position"]
remap_list = []
if remap_dict != None:
    for key, value in remap_dict.items():
        if value in topic_list:
            remap_list.append(value + ":=" + key)
remap = ' '.join(remap_list)
playrosbag_command = "rosbag play /slamhive/dataset/MH_01_easy.bag " \
                + remap  + " --clock "
print(playrosbag_command)
subprocess.run(playrosbag_command, shell=True)

2. Add new SLAM algorithm to SLAM-Hive

For example, you want to upload a new SLAM algorithms named “New-SLAM” with mono mode and stereo mode:

You can firstly create Docker images following other provided algorithms and name them as: “slam-hive-algorithm:new-slam-mono” and “slam-hive-algorithm:new-slam-stereo”.

Then you input:

Image tag: new-slam-mono
Dockerfile and mapping script address link: Docker build link # If you provide
Algorithm Class Name: new-slam
Description: # Some description of algorithm
Attribute: # Some special attributes of algorithm

After all, you can click save button to add the algorithm to the database.

datasets/create.1718611496.txt.gz · Last modified: 2024/06/17 08:04 by liuxzh12023