Skip to content

MikeDegany/s3e_extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3e_extractor

Package to extract data from S3E Dataset ROS 2 bags into standard file formats in organized folders.

Features

Extracts the following topics to files:

  • Compressed Images (sensor_msgs/msg/CompressedImage) -> .jpg
  • Raw Images (sensor_msgs/msg/Image) -> .jpg
  • LiDAR PointClouds (sensor_msgs/msg/PointCloud2) -> .bin (compatible with KITTI format: x, y, z, intensity, ring, time)
  • IMU Data (sensor_msgs/msg/Imu) -> .txt (timestamp, roll, pitch, yaw, angular_vel, linear_accel)
  • GPS Data (sensor_msgs/msg/NavSatFix) -> .txt (timestamp, lat, lon, alt, covariance)

Installation

Prerequisites

  • ROS 2 (tested on Humble/Foxy)
  • OpenCV
  • rosbag2_cpp, cv_bridge, image_transport, tf2

Build

Clone into your workspace src folder:

cd ~/ros2_ws/src
git clone https://github.com/MikeDegany/s3e_extractor.git
cd ..
colcon build --symlink-install --packages-select s3e_extractor # --event-handlers console_direct+
source install/setup.bash

Usage

Download the S3E Dataset Hugging Face

S3E Dataset Extraction (Automatic)

The package includes a launch file specifically designed for the S3E dataset structure (Alpha, Bob, Carol robots).

ros2 launch s3e_extractor s3e_extract.launch.py bag:=/path/to/your/dataset.db3

Arguments:

  • bag: Full path to the .db3 file (or metadata.yaml).
  • folder (optional): Output directory. Defaults to an extracted folder in the same location as the bag file.

Output Structure: The extractor creates a hierarchical folder structure:

extracted/
├── Alpha/
│   ├── left_camera/
│   ├── right_camera/
│   ├── velodyne_points/
│   ├── imu/
│   └── gps/
├── Bob/
│   └── ...
└── Carol/
    └── ...

Manual Usage (Single Node)

You can also run individual extractors for specific topics.

Example: Extract Compressed Image

ros2 run s3e_extractor Comimg2jpg --ros-args \
    -p bag:=/path/to/bag.db3 \
    -p topic:=/camera/image/compressed \
    -p folder:=/output/folder/ \
    -p start_time:=-1.0 \
    -p end_time:=-1.0

Available Nodes:

  • Comimg2jpg: Compressed Images
  • img2jpg: Raw Images
  • pc2bin: PointCloud2 (supports Velodyne, Ouster, Livox, Hesai via lidar_type param)
  • imu2txt: IMU
  • gps2txt: GPS

License

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Acknowledgments

This package is largely based on and adapted from rosbag_extractor by thisparticle. I thank the original authors for their work.

Free Iran

About

Package to extract data from S3E Dataset ROS 2 bags into standard file formats in organized folders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors