Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: camera images and 2d annotations generation #24

Merged
merged 10 commits into from
Nov 8, 2023

Conversation

MagdalenaKotynia
Copy link
Contributor

@MagdalenaKotynia MagdalenaKotynia commented Sep 13, 2023

Description

This PR contains changes needed to convert rosbags to t4dataset with camera images and annotations (including 2d bounding boxes annotations in object_ann.json file).

How to review

How to test

test data

Example test rosbag

Example test config yaml file:

task: convert_rosbag2_to_t4
description:
  scene: synthetic
conversion:
  input_base: <path to rosbags directory>
  output_base: <path to output directory>
  workers_number: 1
  skip_timestamp: 2.0
  num_load_frames: 200
  crop_frames_unit: 50  
  camera_latency_sec: 0.00
  object_topic_name: /ground_truth/objects
  object_msg_type: TrackedObjects
  world_frame_id: world
  lidar_sensor:
    topic: /lidar/concatenated/pointcloud
    channel: LIDAR_CONCAT
  camera_sensors: 
    - topic: /sensing/camera/camera4/image_rect_color
      channel: CAM_FRONT
    - topic: /sensing/camera/camera5/image_rect_color
      channel: CAM_BACK

test command

python -m perception_dataset.convert --config <path to config yaml file> --synthetic --generate-bbox-from-cuboid

Reference

Notes for reviewer

enable synthetic camera images decoding - compressed_msg_to_numpy has been changed to be able to decode both synthetic and real data (synthetic data have bgr8 encoding).

fixed camera view orientation for synthetic data - this change was done to fix the orientation of camera view and to be able to map the annotations to images properly

increased _TIMESTAMP_DIFF to be able to generate syntetic data - work… - this change was done to workaround the issue with too big timestamp mismatch between camera and lidar corresponding frames (should be decreased when the issue is fixed)

implemented generation of 2d bounding boxes annotations in object_ann… - this is implementation of mapping annotations to 2d bounding boxes annotations of images

@MagdalenaKotynia MagdalenaKotynia marked this pull request as ready for review September 13, 2023 11:20
@MagdalenaKotynia MagdalenaKotynia marked this pull request as draft September 18, 2023 11:30
@MagdalenaKotynia MagdalenaKotynia marked this pull request as ready for review September 18, 2023 14:01
Copy link

@pawel-kotowski pawel-kotowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code runs ok on my side.

@MagdalenaKotynia MagdalenaKotynia removed the request for review from boczekbartek September 25, 2023 09:22
@MagdalenaKotynia MagdalenaKotynia force-pushed the feat/camera_images_convertion branch from bbdb1e6 to 1ce640b Compare September 28, 2023 11:07
@MagdalenaKotynia MagdalenaKotynia force-pushed the feat/camera_images_convertion branch from 1ce640b to 6ea82a8 Compare September 28, 2023 17:47
@MagdalenaKotynia
Copy link
Contributor Author

@yukke42
I noticed that the code cannot be run after rebase to last three main commits (starting from this commit d283ecb). I see that in this commit 2caa1a9 some packages from autoware_auto_perception_msgs were migrated to tier4_perception_msgs. I cloned repository again and built and installed ros dependencies from the instructions in README but the Python interpreter does not find the module tier4_perception_msgs so I cannot test the code after rebase to main. Should I revert the rebase to a version that works on my side, or is the current version fine for you?

@yukke42
Copy link
Contributor

yukke42 commented Oct 3, 2023

@MagdalenaKotynia Did you run source install/setup.bash or something? https://github.com/tier4/tier4_perception_dataset#setup
All tests are passed, there doesn't seem to be any issue.

@MagdalenaKotynia
Copy link
Contributor Author

@MagdalenaKotynia Did you run source install/setup.bash or something? https://github.com/tier4/tier4_perception_dataset#setup All tests are passed, there doesn't seem to be any issue.

@yukke42
Yes, I run source install/setup.bash.
When I changed colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to autoware_auto_perception_msgs from instruction
to colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to tier4_perception_msgs, it works now.

@miursh
Copy link
Collaborator

miursh commented Nov 7, 2023

@yukke42 Is this pull request ready to be merged?

@yukke42 yukke42 enabled auto-merge (squash) November 8, 2023 05:18
@yukke42 yukke42 merged commit a88fad2 into main Nov 8, 2023
5 checks passed
@yukke42 yukke42 deleted the feat/camera_images_convertion branch November 8, 2023 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants