-
Notifications
You must be signed in to change notification settings - Fork 665
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(image_projection_based_fusion): substitute message filter with custom synchronizer #2175
feat(image_projection_based_fusion): substitute message filter with custom synchronizer #2175
Conversation
Signed-off-by: tzhong518 <sworgun@gmail.com>
@tzhong518 Cloud you describe how you checked this PR solves the issue we discussed before and the results of it in the Description? |
perception/image_projection_based_fusion/config/pointpainting.param.yaml
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/config/roi_fusion.param.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Codecov ReportBase: 10.82% // Head: 10.79% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2175 +/- ##
==========================================
- Coverage 10.82% 10.79% -0.03%
==========================================
Files 1178 1178
Lines 84623 84798 +175
Branches 19945 19945
==========================================
Hits 9158 9158
- Misses 65755 65930 +175
Partials 9710 9710
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: tzhong518 <sworgun@gmail.com>
Signed-off-by: tzhong518 <sworgun@gmail.com>
perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp
Outdated
Show resolved
Hide resolved
if (!input_offset_ms_.empty() && rois_number_ != input_offset_ms_.size()) { | ||
RCLCPP_ERROR(get_logger(), "The number of topics does not match the number of offsets."); | ||
return; | ||
} |
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.
if (!input_offset_ms_.empty() && rois_number_ != input_offset_ms_.size()) { | |
RCLCPP_ERROR(get_logger(), "The number of topics does not match the number of offsets."); | |
return; | |
} | |
if (input_offset_ms_.empty() || rois_number_ != input_offset_ms_.size()) { | |
throw std::runtime_error("The number of offsets does not match the number of topics."); | |
} |
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.
May I ask what is the difference?
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.
Your program just returns from the constructor and continues without any error in your code, but we want the program to exit with error if rois_number and the size of offsets don't matches.
@tzhong518 |
perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml
Outdated
Show resolved
Hide resolved
perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml
Outdated
Show resolved
Hide resolved
Signed-off-by: tzhong518 <sworgun@gmail.com>
perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml
Outdated
Show resolved
Hide resolved
…bject_fusion.launch.xml Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
perception/image_projection_based_fusion/config/roi_sync.param.yaml
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.
LGTM
Signed-off-by: tzhong518 <sworgun@gmail.com>
…utoware.universe into feature/sync_fusion_callback
…ustom synchronizer (autowarefoundation#2175) * add: custom sync fusion callback Signed-off-by: tzhong518 <sworgun@gmail.com> * ci(pre-commit): autofix * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * fix: change parameter names Signed-off-by: tzhong518 <sworgun@gmail.com> * fix: solve review comments Signed-off-by: tzhong518 <sworgun@gmail.com> * Update perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp * Update perception/image_projection_based_fusion/config/roi_sync.param.yaml Signed-off-by: tzhong518 <sworgun@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
…ustom synchronizer (autowarefoundation#2175) * add: custom sync fusion callback Signed-off-by: tzhong518 <sworgun@gmail.com> * ci(pre-commit): autofix * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * fix: change parameter names Signed-off-by: tzhong518 <sworgun@gmail.com> * fix: solve review comments Signed-off-by: tzhong518 <sworgun@gmail.com> * Update perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp * Update perception/image_projection_based_fusion/config/roi_sync.param.yaml Signed-off-by: tzhong518 <sworgun@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
…ustom synchronizer (autowarefoundation#2175) * add: custom sync fusion callback Signed-off-by: tzhong518 <sworgun@gmail.com> * ci(pre-commit): autofix * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * fix: change parameter names Signed-off-by: tzhong518 <sworgun@gmail.com> * fix: solve review comments Signed-off-by: tzhong518 <sworgun@gmail.com> * Update perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp * Update perception/image_projection_based_fusion/config/roi_sync.param.yaml Signed-off-by: tzhong518 <sworgun@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> Signed-off-by: kminoda <koji.minoda@tier4.jp>
…ustom synchronizer (autowarefoundation#2175) * add: custom sync fusion callback Signed-off-by: tzhong518 <sworgun@gmail.com> * ci(pre-commit): autofix * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * fix: change parameter names Signed-off-by: tzhong518 <sworgun@gmail.com> * fix: solve review comments Signed-off-by: tzhong518 <sworgun@gmail.com> * Update perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com> * Update perception/image_projection_based_fusion/src/fusion_node.cpp * Update perception/image_projection_based_fusion/config/roi_sync.param.yaml Signed-off-by: tzhong518 <sworgun@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Signed-off-by: tzhong518 sworgun@gmail.com
Description
message_filters::sync::ApproximateTime in ROS2 is designed to collect fixed-size sets of messages, which means the callback will not be called unless all messages are subscribed.
As a result, if a roi message is delayed or missed, not only the waiting time will be long but also the set it belongs to might be discarded.
On the other hand, offsets exist between the timestamps of camera and lidar, which is determined by their shutter time. The matching could be more accurate if the offsets are considered.
Therefore, we decided to use a custom synchronizer fusion callback instead of the messge_filter, which
Related links
ticket: https://tier4.atlassian.net/browse/T4PB-21187?focusedCommentId=98418&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-98418
confluence pages: https://tier4.atlassian.net/wiki/spaces/~459732634/pages/2597454815
https://tier4.atlassian.net/wiki/spaces/~459732634/pages/2599911881
rosbag with yolo's result: https://drive.google.com/drive/folders/1cqXByizuWT22nYx9j_5fB42lyGJk9pzg?usp=sharing
Tests performed
Notes for reviewers
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.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.