Commit e4c38ac 1 parent 1ca97cf commit e4c38ac Copy full SHA for e4c38ac
File tree 1 file changed +13
-0
lines changed
common/motion_utils/include/motion_utils/trajectory
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,19 @@ double calcLateralOffset(
607
607
return std::nan (" " );
608
608
}
609
609
610
+ if (overlap_removed_points.size () >= seg_idx) {
611
+ const std::string error_message (
612
+ " [motion_utils] " + std::string (__func__) + " : Overlap points removed exceeded seg_idx." );
613
+ tier4_autoware_utils::print_backtrace ();
614
+ if (throw_exception) {
615
+ throw std::runtime_error (error_message);
616
+ }
617
+ log_error (
618
+ error_message +
619
+ " Return NaN since no_throw option is enabled. The maintainer must check the code." );
620
+ return std::nan (" " );
621
+ }
622
+
610
623
const auto p_front = tier4_autoware_utils::getPoint (overlap_removed_points.at (seg_idx));
611
624
const auto p_back = tier4_autoware_utils::getPoint (overlap_removed_points.at (seg_idx + 1 ));
612
625
You can’t perform that action at this time.
0 commit comments