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(pointcloud_preprocessor): add pipeline latency time debug information for pointcloud pipeline #6056

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

brkay54
Copy link
Member

@brkay54 brkay54 commented Jan 11, 2024

Description

#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 brkay54 requested a review from xmfcx January 11, 2024 13:40
@brkay54 brkay54 self-assigned this Jan 11, 2024
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) labels Jan 11, 2024
@brkay54 brkay54 marked this pull request as draft January 11, 2024 13:41
@brkay54 brkay54 force-pushed the mfc/test-sensing branch 2 times, most recently from c792b08 to bcb2de2 Compare January 11, 2024 13:58
@brkay54 brkay54 marked this pull request as ready for review January 15, 2024 07:07
@brkay54 brkay54 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 15, 2024
Copy link

codecov bot commented Jan 15, 2024

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 ⚠️
...or/src/crop_box_filter/crop_box_filter_nodelet.cpp 0.00% 4 Missing ⚠️
.../src/distortion_corrector/distortion_corrector.cpp 0.00% 4 Missing ⚠️
...src/outlier_filter/ring_outlier_filter_nodelet.cpp 0.00% 3 Missing ⚠️
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%) ⬆️ Carriedforward from 132d7d8

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kminoda
Copy link
Contributor

kminoda commented Jan 29, 2024

FYI: I've created a related PR for perception module #6181

…ation for pointcloud pipeline

Signed-off-by: Berkay Karaman <[email protected]>
update
@brkay54 brkay54 changed the title feat(pointcloud_preprocessor): add accumulation time debug information for pointcloud pipeline feat(pointcloud_preprocessor): add pipeline latency time debug information for pointcloud pipeline Jan 31, 2024
Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

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

LGTM

@brkay54 brkay54 enabled auto-merge (squash) January 31, 2024 14:05
@miursh miursh added tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Jan 31, 2024
@brkay54 brkay54 merged commit 6000936 into main Feb 1, 2024
32 of 37 checks passed
@brkay54 brkay54 deleted the mfc/test-sensing branch February 1, 2024 08:28
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Feb 1, 2024
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Feb 1, 2024
YoshiRi pushed a commit to tier4/autoware.universe that referenced this pull request May 13, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants