autoware.universe
autoware.universe copied to clipboard
control_performance_analysis crashes with segfault
Checklist
- [X] I've read the contribution guidelines.
- [X] I've searched other issues and no duplicate issues were found.
- [X] I'm convinced that this is not my fault but a bug.
Description
I have seen control_performance_analysis
crash when the idx_prev_wp_
pointer is not initialized, and is dereferenced on https://github.com/autowarefoundation/autoware.universe/blob/main/control/control_performance_analysis/src/control_performance_analysis_core.cpp#L378
- this happens when the ego is either beyond
acceptable_max_distance_to_waypoint_
from the trajectory, or the heading error is larger thanacceptable_max_yaw_difference_rad_
, which causesclosest_segment
to be empty, and theidx_prev_wp_
to remain uninitialized
Expected behavior
The node should safely handle the case where closest_segment
is empty
Actual behavior
[ERROR] [control_performance_analysis_exe-24]: process has died [pid 216, exit code -11, cmd ...
Steps to reproduce
- I am using a pre-defined fixed
Trajectory
message to test the Autoware control component without the planning component - This issue occurs when the localization initializes while the vehicle is somewhat far (> a few meters) from the trajectory
Versions
No response
Possible causes
No response
Additional context
No response
This pull request has been automatically marked as stale because it has not had recent activity.
@kasper-helm Thank you so much for your report and sorry for late response :sob: If it's possible, could you give me the information how to reproduce problem? (e.g. which version of autoware you are using, how did you launch autoware, which comman did you run to publish trajectory.
I think I fixed it by adding the following line above https://github.com/autowarefoundation/autoware.universe/blob/main/control/control_performance_analysis/src/control_performance_analysis_core.cpp#L378
if (!idx_prev_wp_) { return std::nullopt; }
@kasper-helm Wonderful thanks! Sorry for not supporting well :cry: If you create PR, I will review the PR :+1:
This pull request has been automatically marked as stale because it has not had recent activity.