-
Notifications
You must be signed in to change notification settings - Fork 570
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(obstacle_collision_checker): fix dynamic parameter update #2153
feat(obstacle_collision_checker): fix dynamic parameter update #2153
Conversation
Codecov ReportBase: 10.82% // Head: 10.80% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2153 +/- ##
==========================================
- Coverage 10.82% 10.80% -0.02%
==========================================
Files 1177 1177
Lines 84506 84647 +141
Branches 19898 19986 +88
==========================================
+ Hits 9149 9150 +1
- Misses 65666 65797 +131
- Partials 9691 9700 +9
*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. |
// Dynamic Reconfigure | ||
OnSetParametersCallbackHandle::SharedPtr set_param_res_; | ||
rcl_interfaces::msg::SetParametersResult paramCallback( | ||
const std::vector<rclcpp::Parameter> & parameters); |
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.
This should not be removed and I do not understand why this fixes the issue.
Is another node setting the parameter search_radius
to 0
?
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.
I have the same question. I'd like to fix it properly.
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.
I added dynamic reconfiguration again, and I updated update_param
function, then parameters were set successfully. Also, I added node to control.launch.py
. I am gonna change the PR name.
…refoundation#2153 Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
9e555e0
to
4957f10
Compare
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
for (size_t i = 1; i < vehicle_footprints.size(); | ||
i++) { // skip first footprint because surround obstacle checker handle it |
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.
Could you write the comment above the for-loop to fix layout?
for (size_t i = 1; i < vehicle_footprints.size(); | |
i++) { // skip first footprint because surround obstacle checker handle it | |
// skip first footprint because surround obstacle checker handle it | |
for (size_t i = 1; i < vehicle_footprints.size(); i++) { |
@@ -266,6 +297,7 @@ def launch_setup(context, *args, **kwargs): | |||
shift_decider_component, | |||
vehicle_cmd_gate_component, | |||
operation_mode_transition_manager_component, | |||
obstacle_collision_checker_component, |
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.
@TakaHoribe @yukkysaito How should we handle this? Is it okay for TIER IV to add this here, or should we consider another way? Maybe adding a if-condition is good?
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.
It depends on the product, so I want to add an if-condition.
BTW, I feel strange that obstacle_collision_checker is in the control component.
I think it would be better to put obstacle_collision_checker into diagnostic systems and make it configurable there in the future.
[&name](const rclcpp::Parameter & parameter) { return parameter.get_name() == name; }); | ||
if (it != parameters.cend()) { | ||
value = it->template get_value<T>(); | ||
const auto itr = std::find_if( |
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.
@brkay54 Since it seems that bug-fix and refactoring are mixed, could you split PRs into the appropriate sizes/types?
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 review. I am going to close this PR and create 3 PRs for bug-fix, refactoring, and for launch files (I gonna add flag for obstacle_collision_checker
to enable).
Signed-off-by: Berkay Karaman berkay@leodrive.ai
Description
Closes #2143
While Bus ODD tests, we needed to use obstacle_collision_checker package to bring to vehicle collision awareness. If vehicle can not stop with nominal acceleration before collision, it should send emergency stop. However, obstacle_collision_checker failed in tests.
After little investigation, we realize the parameters are returning zero. Because search_radius is returning zero, node can not detect anything in the lane. After some changes and updating param call back function, node run successfully.
Related links
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.