-
Notifications
You must be signed in to change notification settings - Fork 682
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(planning_validator): add validation for trajectory length and related tests #6195
feat(planning_validator): add validation for trajectory length and related tests #6195
Conversation
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
This reverts commit a360bd0.
@@ -296,7 +296,7 @@ std::pair<double, size_t> calcMaxSteeringRates( | |||
const auto steer_next = steering_array.at(i + 1); | |||
|
|||
const auto steer_rate = (steer_next - steer_prev) / dt; | |||
takeBigger(max_steering_rate, max_index, steer_rate, i); | |||
takeBigger(max_steering_rate, max_index, std::abs(steer_rate), i); |
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.
Fix bug.
@@ -148,6 +152,20 @@ void PlanningValidator::setupDiag() | |||
setStatus( | |||
stat, validation_status_.is_valid_velocity_deviation, "velocity deviation is too large"); | |||
}); | |||
d->add(ns + "distance_deviation", [&](auto & stat) { |
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.
Add missing diagnostic
@@ -55,7 +59,7 @@ class PubSubManager : public rclcpp::Node | |||
|
|||
void spinSome(rclcpp::Node::SharedPtr node_ptr) | |||
{ | |||
for (int i = 0; i < 50; ++i) { | |||
for (int i = 0; i < 10; ++i) { |
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.
Need to make sure this spin time is enough for CICD. This works well in my environment.
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
@@ -95,4 +95,5 @@ MapProjectionLoader::MapProjectionLoader() : Node("map_projection_loader") | |||
const auto adaptor = component_interface_utils::NodeAdaptor(this); | |||
adaptor.init_pub(publisher_); | |||
publisher_->publish(msg); | |||
RCLCPP_WARN(get_logger(), "published map projection message"); |
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.
Is this temporary code for debugging?
Or do you really want to merge it in the main branch as a WARN message?
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.
@SakodaShintaro Sorry, this is just my mistake. This PR won't have any modification out of the planning_validator pkg.
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6195 +/- ##
==========================================
+ Coverage 14.87% 15.02% +0.14%
==========================================
Files 1838 1838
Lines 126549 126843 +294
Branches 37958 38055 +97
==========================================
+ Hits 18826 19057 +231
+ Misses 86503 86492 -11
- Partials 21220 21294 +74
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
std::cerr << "forward_length_required = " << forward_length_required | ||
<< ", forward_length = " << forward_length << std::endl; |
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.
is this needed?
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! I removed it.
Signed-off-by: Takamasa Horibe <[email protected]>
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!
…lated tests (autowarefoundation#6195) * tmp modify for smoother Signed-off-by: Takamasa Horibe <[email protected]> * improve planning validator Signed-off-by: Takamasa Horibe <[email protected]> * Revert "tmp modify for smoother" This reverts commit a360bd0. * remove undesired debug dependency Signed-off-by: Takamasa Horibe <[email protected]> * fix include guard Signed-off-by: Takamasa Horibe <[email protected]> * remove unintentional change Signed-off-by: Takamasa Horibe <[email protected]> * use acceleration to calculate required trajectory length Signed-off-by: Takamasa Horibe <[email protected]> * fix tests Signed-off-by: Takamasa Horibe <[email protected]> * remove debug comment Signed-off-by: Takamasa Horibe <[email protected]> --------- Signed-off-by: Takamasa Horibe <[email protected]>
…lated tests (autowarefoundation#6195) * tmp modify for smoother Signed-off-by: Takamasa Horibe <[email protected]> * improve planning validator Signed-off-by: Takamasa Horibe <[email protected]> * Revert "tmp modify for smoother" This reverts commit a360bd0. * remove undesired debug dependency Signed-off-by: Takamasa Horibe <[email protected]> * fix include guard Signed-off-by: Takamasa Horibe <[email protected]> * remove unintentional change Signed-off-by: Takamasa Horibe <[email protected]> * use acceleration to calculate required trajectory length Signed-off-by: Takamasa Horibe <[email protected]> * fix tests Signed-off-by: Takamasa Horibe <[email protected]> * remove debug comment Signed-off-by: Takamasa Horibe <[email protected]> --------- Signed-off-by: Takamasa Horibe <[email protected]>
Description
This PR improves planning validation.
Now, the planning_validator can detect the invalid planning trajectory more correctly. For example, a very short path can be detected.
Before
planning_validator_before-2024-01-29_00.48.02.mp4
After
planning_validator_after-2024-01-29_00.29.33.mp4
Related links
None
Tests performed
Notes for reviewers
None
Interface changes
None
Effects on system behavior
The planning validation may will make more errors in diagnostics.
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.