Skip to main content

rosbag-util

Extract synchronized point cloud frames (and optional GPS) from one or more ROS bags.

Install

pip install -e .

Prerequisites

  • ROS Python environment with rosbag and sensor_msgs available (e.g. ROS Noetic), and source your ROS setup.

Usage

Single car:

rosbag-extract \
  --bags "/path/to/car1.bag" \
  --pc-topic "/perception/lidar/concated_points_cloud" \
  --gps-topic "/location/best_position" \
  --out "cooperative/car1" \
  --binary

Batch undistort images:

python -m rosbag_util.undistort_images \
  --input ./imgs \
  --output ./undist \
  --cam 3 \
  --model pinhole \
  --camera-config ./configs/camera_config.json

Using a config file:

python -m rosbag_util.undistort_images --config ./configs/undistort_config.json

Merge multi-car point clouds (same frame):

python -m rosbag_util.merge_multi_pcd \
  --root cooperative/zhidao \
  --cars car1 car2 car3 \
  --out_frame ref \
  --ref-car car1 \
  --yaw_only

Using a config file:

python -m rosbag_util.merge_multi_pcd --config ./configs/merge_multi_config.json

Multi car (car1 as main):

rosbag-extract \
  --bags "/path/to/car1.bag" "/path/to/car2.bag" \
  --main 0 \
  --pc-topic "/perception/lidar/concated_points_cloud" \
  --gps-topic "/location/best_position" \
  --out "cooperative/scene1" \
  --max-dt 0.300 \
  --save-workers 8 \
  --index-threads 2 \
  --binary

Config file (JSON):

{
  "bags": ["/path/to/car1.bag", "/path/to/car2.bag"],
  "main": 0,
  "pc_topic": "/perception/lidar/concated_points_cloud",
  "gps_topic": "/location/best_position",
  "out": "cooperative/scene1",
  "max_dt": 0.3,
  "binary": true,
  "save_workers": 8,
  "index_threads": 2
}
rosbag-extract --config ./configs/config.json

Metadata

Release files for rosbag-util 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rosbag-util 1.0.6
File Size Uploaded
rosbag_util-1.0.6.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rosbag-util 1.0.6
File Interpreter ABI Platform
rosbag_util-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 42.3 kB

Release files / rosbag_util-1.0.6.tar.gz

Download URL rosbag_util-1.0.6.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4daf715b389fe64070de980d1aa63dae51f8e56fe92294b66dded2ec76562fb
BLAKE2b-256 checksum
How to use checksums
03b57e4f8e76e7f6d07474d934659672457051dfa3ea8bb69f3a1e2c97fce4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / rosbag_util-1.0.6-py3-none-any.whl

Download URL rosbag_util-1.0.6-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f8df1dd53794bc22011cdf240d582faa1cabc3fe22984c31d8412528b7f8220
BLAKE2b-256 checksum
How to use checksums
101305c0af950c2b2abc0de1495d7c45072ee01adb93d6cd94bfd02b78d1dcf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page