Tags: tier4/autoware_core
Tags
fix(path_generator): cut path before loop prior to intersection check (… …#66) * fix(path_generator): cut path before loop prior to intersection check * fix(path_generator): prevent crash when trimming short bounds in intersection check Add defensive check in trim_bound lambda to prevent calling crop() on trajectories that are too short. This fixes SIGSEGV crashes that occurred when lanelet_sequence was shortened by loop detection, resulting in bounds that were shorter than vehicle_length. The fix ensures that: - If bound.length() <= vehicle_length, the original bound is returned - If bound.length() > vehicle_length, crop() is safely executed - After crop(), if the result is empty, the original bound is returned This resolves test failures in: - test_test_static_centerline_generator_path_generator_case1_launch.test.py (Test 6) - test_test_static_centerline_generator_path_generator_case4_launch.test.py (Test 9) Both tests were timing out due to crashes in get_first_start_edge_bound_intersection_arc_length() when calling Trajectory<>::restore() on invalid cropped trajectories. Signed-off-by: toshifumi.teranishi <toshifumi.teranishi@tier4.jp> --------- Signed-off-by: toshifumi.teranishi <toshifumi.teranishi@tier4.jp>
PreviousNext