M3DSS-dataset

Data pre-process

1. Abstract

In this report, we provide a brief overview of our Data pre-process. This primarily involves modify the frequency of event streams.

2. Modify the frequency of event streams

The frequency of our event streams is 1000Hz. You can use events_repacking_helper to extract event streams from the original bag and modify the frequency of event streams to a fixed frequency to meet your specific requirements. This tool is modified based on ESVO.

2.1 Events_repacking_helper Installation

After cloning this repository, you can run the following command to install this tool

cd ~/catkin_ws/src
catkin build events_repacking_helper

2.2 Events_repacking_helper Usage

This package provides an example of preparing a bag file for ESVIO. A bag file recorded by a stereo event camera (e.g., a pair of DAVIS sensors) typically consists of the following topics:

/davis_left/events
/davis_right/events

The original frequency of /davis_left/events is 60Hz:

Image description
Fig. 1. The original frequency of /davis_left/events topic is 60Hz

You need to set the input and output paths as arguments in the file repacking.launch and change the event topics in the file EventMessageEditor.cpp, and then run the following command

roslaunch events_repacking_helper repacking.launch

After running the above command, the frequency of event streams will be modified to 1000Hz as follow:

Image description
Fig. 2. The modified frequency of /davis_left/events topic is 1000Hz

Finally, the output bag file will be saved in the output path you set.

3. Filter Topic from rosbag

The new rosbag from events_repacking_helper only contain the event streams. If you want to use the data sequence in multi-sensor fusion SLAM systems, you need to filter the topic from the raw rosbag and them merge it with the rosbag from events_repacking_helper.

rosbag filter input.bag output.bag "topic == 'topic_name_1' or topic == 'topic_name_2'"

For example, we want to filter the topic: "/dvs/image_raw", "/dvs/imu" and "/optitrack/davis" from dynamic_rotation.bag of DAVIS240C, we can use the following command

rosbag filter /home/kwanwaipang/dataset/EVI-SAM/davis240c/dynamic_rotation.bag /home/kwanwaipang/dataset/EVI-SAM/davis240c/dynamic_rotation_other.bag "topic == '/dvs/image_raw' or topic == '/dvs/imu' or topic == '/optitrack/davis' "

Image description Image description
Fig. 3. The Topics of the rosbag before and after filtering

4. Merge rosbag

After filtering the topic from the raw rosbag, we can merge the rosbag from events_repacking_helper and the filtered rosbag. We firstly obtain the 1000HZ event rosbag from events_repacking_helper (as shown in Fig.4).

Image description
Fig. 4. The modified frequency of /davis_left/events topic is 1000Hz

And then we merge it with the filtered rosbag from the previous section3. The code of the merge rosbag can be obtain form Link.

catkin build mpl_dataset_toolbox
roslaunch mpl_dataset_toolbox bag_merger.launch directory_path:=[path_to_directory]
roslaunch mpl_dataset_toolbox bag_merger.launch directory_path:=/home/kwanwaipang/dataset/EVI-SAM/davis240c/dynamic_rotation

Note the the rosbags are needed to be in the same folder, with the following renamed files (we will fix this in the future).

Image description
Fig. 5. Repacking the rosbags for Merging

Finally, we can obtain the final merged rosbag. Note that the number of msgs of "/dvs/image_raw", "/dvs/imu" and "/optitrack/davis" are same as the left side of Fig.3. While the number of msgs of "/dvs/events" is similar to "/dvs/imu", which is 1000 HZ.

Image description
Fig. 6. The Final Merged rosbag

5. Rosbag editor

Rosbag_editor can edit desired topics from the original ROSBAG and save them as a new rosbag. (as shown in Fig.7).

makedir ws_rosbag_editor/src & cd ws_rosbag_editor/src
git clone https://github.com/facontidavide/rosbag_editor.git
cd .. & catkin_make
rosrun rosbag_editor rosbag_editor

Image description
Fig. 7. Rosbag_editor

6. GT generation

6.1 M3DSS-Driving-gt

The ground truth of the M3DSS Driving dataset is generated in the SPAN-CPT system. Referred to Link. The script loads all SPAN-CPT Ground True data and converts them to ENU frame or LiDAR local frame (set convert_body_frame = True) with the first line as origin. And convert the GT to local coordinate based on the first message and the heading following TUM format.
Specifically, first download it and then install some dependencies

cd gt_vis
pip3 install numpy-quaternion matplotlib pymap3d

Then change the 'novatel_path' in "run_vehicle_path.py" and execute (as shown in Fig.8)

python3 run_vehicle_path.py

Driving GT to TUM format
Fig. 8. Driving GT to TUM format

You will get the truth value in TUM format, and then you can use evo tools to evaluate the algorithm performance .