autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

feat(pointcloud_preprocessor): add accumulation time debug information for pointcloud pipeline

Open brkay54 opened this issue 1 year ago • 1 comments

Description

https://github.com/autowarefoundation/autoware.universe/issues/6032

As mentioned in the issue, we are mostly using the ros2 topic delay /topic_name which shows us the time between the message header and the current time. This method is suitable for small-size messages, however, it adds extra delay because accessing the point cloud messages from outside decreases the performance of the pipeline because of the large size of the point cloud message.

Comparision of ros2 topic delay and accumulated_time

Left to right: Cropbox Filter Self -> Cropbox Filter Mirror -> Distortion Corrector -> Ring Outlier Filter

compare-ros2-delay

As you can see, the ros2 topic delay is adding some extra-delay to actual delay in every step. Also, although accumulated time is increasing in every step (as we expected), ros2 topic delay gives us not accurate and weird output.

The primary reason is that our sensing/perception nodes run within composable node containers and utilize intra-process communication. External subscriptions to these messages, like using ros2 topic delay or rviz2, add additional delays. Even slow down existing pipelines just by subscribing from outside.

Because of these reasons, it is better to publish the delay time which is reported by the node to not damage the intra-process communication of the point cloud pipeline.

To achieve this, we added accumulation_time information to each stage of the pipeline to measure how much time takes in the processes for each lidar.

The user can see the accumulated_time measurement for the lidar sensor output which is named "LidarX" by subscribing following topics:

/sensing/lidar/LidarX/crop_box_filter_self/debug/accumulated_time_ms 
/sensing/lidar/LidarX/crop_box_filter_mirror/debug/accumulated_time_ms
/sensing/lidar/LidarX/distortion_corrector/debug/accumulated_time_ms 
/sensing/lidar/LidarX/ring_outlier_filter/debug/accumulated_time_ms 
/sensing/lidar/concatenate_data_synchronizer/debug/accumulated_time_ms/sensing/lidar/LidarX/pointcloud

Related links

Tests performed

Notes for reviewers

Interface changes

Effects on system behavior

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • [ ] The PR follows the pull request guidelines.
  • [ ] The PR has been properly tested.
  • [ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.
  • [ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

brkay54 avatar Jan 11 '24 13:01 brkay54

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (132d7d8) 14.39% compared to head (cbf3c5e) 14.46%. Report is 19 commits behind head on main.

Files Patch % Lines
...atenate_data/concatenate_and_time_sync_nodelet.cpp 0.00% 7 Missing :warning:
...or/src/crop_box_filter/crop_box_filter_nodelet.cpp 0.00% 4 Missing :warning:
.../src/distortion_corrector/distortion_corrector.cpp 0.00% 4 Missing :warning:
...src/outlier_filter/ring_outlier_filter_nodelet.cpp 0.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6056      +/-   ##
==========================================
+ Coverage   14.39%   14.46%   +0.06%     
==========================================
  Files        1906     1906              
  Lines      129860   130105     +245     
  Branches    37582    37766     +184     
==========================================
+ Hits        18699    18817     +118     
- Misses      90167    90234      +67     
- Partials    20994    21054      +60     
Flag Coverage Δ *Carryforward flag
differential 7.01% <0.00%> (?)
total 14.39% <ø> (+<0.01%) :arrow_up: Carriedforward from 132d7d8

*This pull request uses carry forward flags. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 15 '24 16:01 codecov[bot]

FYI: I've created a related PR for perception module https://github.com/autowarefoundation/autoware.universe/pull/6181

kminoda avatar Jan 29 '24 03:01 kminoda