-
Notifications
You must be signed in to change notification settings - Fork 33
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(path_optimizer): additional failure logging and failure mode handling #1905
Conversation
ae2a9a3
to
1fcebfb
Compare
ca881f7
to
4f84b91
Compare
0078eea
to
56f8eb4
Compare
const bool apply_input_velocity = !(optimized_traj_failed || elapsed_time_over_three_seconds); | ||
mrm_required_ = optimized_traj_failed && elapsed_time_over_three_seconds; | ||
|
||
if (!apply_input_velocity) { |
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.
We can remove this part for the new velocity change. The reported issue will not happen since we have a short time condition to trigger MRM.
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.
Done.
return getPrevOptimizedTrajectory(p.traj_points); | ||
} | ||
|
||
if (enable_skip_optimization_) { | ||
mrm_required_ = false; |
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.
Instead of inserting mrm_required_ = false;
one by one, let's put it at the beginning of the optimizeTrajectory
function only once.
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.
Done.
@@ -75,6 +78,7 @@ class PathOptimizer : public rclcpp::Node | |||
bool enable_outside_drivable_area_stop_; | |||
bool enable_skip_optimization_; | |||
bool enable_reset_prev_optimization_; | |||
bool mrm_required_{false}; |
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.
Publishing the diagnostics does not mean triggering the MRM since it depends on the setting of the system packages.
So, is_optimization_failed_
or something would be proper.
@@ -301,6 +310,21 @@ bool PathOptimizer::checkInputPath(const Path & path, rclcpp::Clock clock) const | |||
return true; | |||
} | |||
|
|||
void PathOptimizer::onCheckPathOptimizationValid(diagnostic_updater::DiagnosticStatusWrapper & stat) | |||
{ | |||
const std::string error_msg = "[Path Optimizer]: MRM not required"; |
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.
The same comment as above of "Publishing the diagnostics does not mean triggering the MRM since it depends on the setting of the system packages."
IMO, we should remove the word "MRM" from here, and just letting the latter module know that the path_optimizer has xxx kind of error would be enough.
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.
Done.
@@ -110,7 +183,7 @@ class MPTOptimizer | |||
const TrajectoryParam & traj_param, const std::shared_ptr<DebugData> debug_data_ptr, | |||
const std::shared_ptr<autoware::universe_utils::TimeKeeper> time_keeper_); | |||
|
|||
std::vector<TrajectoryPoint> optimizeTrajectory(const PlannerData & planner_data); | |||
std::pair<std::vector<TrajectoryPoint>, int> optimizeTrajectory(const PlannerData & planner_data); |
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.
Instead of using std::pair with int, please use std::optional<std::vector>.
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.
Done.
71b3f96
to
9b96851
Compare
Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
1624e39
to
50cc611
Compare
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
…dling (#1905) * conditional timer - MRM trigger Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…dling (#1905) * conditional timer - MRM trigger Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
Returns the smoothed_points trajectory fed into MPT when the latter fails, triggers an emergency stop MRM after 3s.
Related links
Parent Issue:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.