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

perf(autoware_universe_utils): introduce managed transform buffer with implicitly defined listener type #9197

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amadeuszsz
Copy link
Contributor

@amadeuszsz amadeuszsz commented Oct 30, 2024

Description

See parent issue.

Related links

Parent Issue:

How was this PR tested?

cd ~/autoware
git checkout 0.41.2
vcs import src < autoware.repos
git clone https://github.com/autowarefoundation/ManagedTransformBuffer src/universe/external/managed_transform_buffer
cd src/universe/autoware/autoware.universe
git remote add amadeuszsz https://github.com/amadeuszsz/autoware.universe.git
git pull amadeuszsz feat/managed-tf-buffer-demo-test
git checkout feat/managed-tf-buffer-demo-test
cd ~/autoware
cd src/core/autoware_utils
git remote add amadeuszsz https://github.com/amadeuszsz/autoware_utils.git
git pull amadeuszsz feat/remove-managed-tf-buffer
git checkout feat/remove-managed-tf-buffer
cd ~/autoware
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release"-DCMAKE_EXPORT_COMPILE_COMMANDS=On
# press space to resume rosbag
ros2 bag play ~/autoware_data/rosbags/sample-rosbag/ -r 1.0 -p
ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-rosbag vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

To validate number of listeners during runtime, use ros2 node list | grep impl -c.

Notes for reviewers

Interface changes

  • has_static_tf_only parameter is not necessary anymore.
  • getTransform now has form getTransform<typename T> (geometry_msgs::msg::TransformStamped, tf2::Transform, Eigen::Matrix4f).
  • getTransform returns std::optional.

Effects on system behavior

See parent issue.

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) tag:require-cuda-build-and-test labels Oct 30, 2024
Copy link

github-actions bot commented Oct 30, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@amadeuszsz amadeuszsz self-assigned this Oct 30, 2024
@amadeuszsz amadeuszsz added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 30, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 36.92308% with 41 lines in your changes missing coverage. Please review.

Project coverage is 26.39%. Comparing base (fbc7a9d) to head (8232deb).

Files with missing lines Patch % Lines
...ng/autoware_pointcloud_preprocessor/src/filter.cpp 7.69% 12 Missing ⚠️
...r/src/time_synchronizer/time_synchronizer_node.cpp 0.00% 7 Missing ⚠️
..._map_filter/vector_map_inside_area_filter_node.cpp 0.00% 5 Missing ⚠️
...r/src/concatenate_data/concatenate_pointclouds.cpp 0.00% 4 Missing ⚠️
...src/vector_map_filter/lanelet2_map_filter_node.cpp 0.00% 4 Missing ⚠️
...und_segmentation/src/ransac_ground_filter/node.cpp 57.14% 0 Missing and 3 partials ⚠️
...ssor/distortion_corrector/distortion_corrector.hpp 60.00% 0 Missing and 2 partials ⚠️
.../src/distortion_corrector/distortion_corrector.cpp 77.77% 0 Missing and 2 partials ⚠️
...distortion_corrector/distortion_corrector_node.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9197      +/-   ##
==========================================
- Coverage   26.39%   26.39%   -0.01%     
==========================================
  Files        1389     1389              
  Lines      107757   107775      +18     
  Branches    41509    41517       +8     
==========================================
+ Hits        28441    28445       +4     
- Misses      76479    76495      +16     
+ Partials     2837     2835       -2     
Flag Coverage Δ *Carryforward flag
differential 38.26% <36.92%> (?)
differential-cuda 34.87% <36.92%> (?)
total 26.39% <ø> (-0.01%) ⬇️ Carriedforward from fbc7a9d

*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.

Copy link

stale bot commented Feb 23, 2025

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added status:stale Inactive or outdated issues. (auto-assigned) and removed status:stale Inactive or outdated issues. (auto-assigned) labels Feb 23, 2025
@amadeuszsz amadeuszsz force-pushed the perf/tf-listener-improvement branch 2 times, most recently from 6252fcd to 00a18a9 Compare February 25, 2025 13:32
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
@amadeuszsz amadeuszsz force-pushed the perf/tf-listener-improvement branch from 00a18a9 to 8232deb Compare March 5, 2025 08:46
@amadeuszsz amadeuszsz requested a review from mojomex as a code owner March 5, 2025 08:46
@@ -33,15 +33,14 @@ Detail description of each ground segmentation algorithm is in the following lin

### Node Parameters

| Name | Type | Default Value | Description |
| -------------------- | ------ | ------------- | ------------------------------------- |
| `input_frame` | string | " " | input frame id |
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really for this PR, but
" " does not evaluate as empty, so I think it goes against its apparent objective

if (!tf_input_frame_.empty() && cloud->header.frame_id != tf_input_frame_) {

@badai-nguyen what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) tag:require-cuda-build-and-test type:documentation Creating or refining documentation. (auto-assigned)
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants