-
Notifications
You must be signed in to change notification settings - Fork 712
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
refactor(autoware_image_projection_based_fusion): organize 2d-detection related members #9789
refactor(autoware_image_projection_based_fusion): organize 2d-detection related members #9789
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
e079772
to
f5a5a56
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9789 +/- ##
==========================================
- Coverage 29.72% 29.62% -0.10%
==========================================
Files 1453 1453
Lines 108989 108841 -148
Branches 42627 42510 -117
==========================================
- Hits 32392 32244 -148
+ Misses 73484 73391 -93
- Partials 3113 3206 +93
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@technolojin Are you sure this is "refactor" and not "feat" nor "fix"? At least the logic around mutex is changed, so I think it is risky to name it "refactor". |
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
Since the mutex related changes are removed, this PR became a pure refactoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your thoughtful refactoring! The updated code is significantly more readable and well-structured compared to the previous version.
In my opinion, there are likely areas within roi_pointcloud_fusion
and pointpainting_fusion
that could also be improved further.
perception/autoware_image_projection_based_fusion/src/roi_pointcloud_fusion/node.cpp
Outdated
Show resolved
Hide resolved
perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp
Outdated
Show resolved
Hide resolved
perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you consider making splitting this PR into several ones? Current changes are bit too many to assess.
My suggestion is:
- PR 1: Simply replacing the type names with "using PointCloudMsgType", "using RoiMsgType"
- PR 2: Introduce
Det2dStatus
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Show resolved
Hide resolved
perception/autoware_image_projection_based_fusion/src/pointpainting_fusion/node.cpp
Outdated
Show resolved
Hide resolved
I understand your point. |
@technolojin I see, I thought it is worth splitting if it only takes 20-30min, but if it takes 5hr then it's not necessary. Let me review this PR as it is. |
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Export the `exportProcess()` method in `fusion_node.cpp` to handle the post-processing and publishing of the fused messages. This method cancels the timer, performs the necessary post-processing steps, publishes the output message, and resets the flags. It also adds processing time for debugging purposes. This change improves the organization and readability of the code. Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Refactor the `fusion_node.hpp` and `fusion_node.cpp` files to improve code organization and readability. This includes exporting the `exportProcess()` method in `fusion_node.cpp` to handle post-processing and publishing of fused messages, adding comments on each process step, organizing methods, and fusing the main message with cached ROI messages. These changes enhance the overall quality of the codebase. Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
…zation and readability Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for 五月雨式 comments 🙇
...tion_based_fusion/include/autoware/image_projection_based_fusion/roi_cluster_fusion/node.hpp
Outdated
Show resolved
Hide resolved
perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
Outdated
Show resolved
Hide resolved
...image_projection_based_fusion/include/autoware/image_projection_based_fusion/fusion_node.hpp
Show resolved
Hide resolved
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
63fd796
to
ca1a474
Compare
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
…zation and readability Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
perception/autoware_image_projection_based_fusion/src/pointpainting_fusion/node.cpp
Show resolved
Hide resolved
perception/autoware_image_projection_based_fusion/src/roi_pointcloud_fusion/node.cpp
Show resolved
Hide resolved
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the refactor 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Description
Avoid to use index-based member management.
Det2dStatus
replaces vector of variables related to roi/camera.This PR do not contain any logical change.
Related links
Parent Issue:
How was this PR tested?
TIER IV INTERNAL 1
TIER IV INTERNAL 2
TIER IV INTERNAL 3
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.