Skip to content

Commit

Permalink
Merge branch 'main' into feat/port/rosbag2_to_annotated_t4_tlr
Browse files Browse the repository at this point in the history
  • Loading branch information
miursh authored Dec 18, 2023
2 parents edf2977 + 26f85f7 commit 39d2d49
Show file tree
Hide file tree
Showing 4 changed files with 391 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/tracking_simulator_conversions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Tools Overview

This document offers a concise overview of the scripts employed in the conversion process for the tracking simulator.
Prior to reading this document, we recommend referring to the [tools overview](./tools_overview.md) for a comprehensive description of the entire repository.

## tracking debugger rosbag to annotated T4 format

input: rosbag2 with ground_truth/objects
output: T4 format data

```bash
python -m perception_dataset.convert --config config/rosbag2_to_t4/convert_tracking_debugger_to_tracking_eval.yaml
```

## scenario simulator rosbag

This guide emphasizes the utilization of the rosbag output generated by the planning scenario simulator.
The T4 format of this output proves valuable for conducting regression tests on the tracking module.

input: rosbag2 with ground_truth/objects and obstacle_segmentation/pointcloud
output: T4 format data

```bash
python -m perception_dataset.convert --config config/rosbag2_to_t4/convert_scenario_sim_to_tracking_eval.yaml
```
5 changes: 5 additions & 0 deletions perception_dataset/deepen/annotated_t4_to_deepen_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def _convert_one_scene(self, input_dir: str, scene_name: str):

sample_data_record = nusc.get("sample_data", sample_record["data"][sensor])
file_id = osp.basename(sample_data_record["filename"]).replace(".pcd.bin", ".pcd")

# Original T4 format names the file_id as 000000.pcd.bin for example.
# We need to convert it to 0.pcd in this case.
file_id = str(int(file_id.split(".")[0])) + ".pcd"

label_category_id = self._label_converter.convert_label(category_record["name"])

attributes_records = [
Expand Down
16 changes: 16 additions & 0 deletions tests/config/convert_tracking_debugger_to_tracking_eval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
task: convert_rosbag2_to_t4_tracking
description:
scene: ["tracking_regression", "synthetic"]
conversion:
# path to rosbag dir output by simulator
input_base: ./data/rosbag2_tracking_debugger
output_base: ./data/pseudo_labeling_t4_format
skip_timestamp: 1.0
num_load_frames: 0
object_topic_name: /perception/object_recognition/ground_truth/objects
object_msg_type: TrackedObjects
lidar_sensor: # tracking debugger data has no lidar
topic: ""
channel: ""
camera_sensors: [] # synthetic data has no images
topic_list: ./config/topic_list_tracking_eval.yaml
Loading

0 comments on commit 39d2d49

Please sign in to comment.