Skip to main content

Utilities for extracting synchronized frames from ROS bag files.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rosbag_util-1.0.5.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rosbag_util-1.0.5-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file rosbag_util-1.0.5.tar.gz.

File metadata

  • Download URL: rosbag_util-1.0.5.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rosbag_util-1.0.5.tar.gz
Algorithm Hash digest
SHA256 7b4b10e82b3184030f2e790c64df267eef2a034633e5fbf7d10755c85a91f612
MD5 b37f541d5a0ec5e0f072a14be6a7a054
BLAKE2b-256 15124e152083d34d3da383dab6ba136ec1d9ba6b2a89d055f664c0c80d76024a

See more details on using hashes here.

File details

Details for the file rosbag_util-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: rosbag_util-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rosbag_util-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b28e2d8963d21cd31a5168ef13a0a7441b23cccc8b3c6e3ef088335de7588277
MD5 8db2778ef253639f98dc9a5804214177
BLAKE2b-256 afc35b2b79b65077e2fe232ce7ebc052bfd37381093b7dccfdfee3d4926f390c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page