diff --git a/simulation/traffic_simulator/src/utils/pose.cpp b/simulation/traffic_simulator/src/utils/pose.cpp index b354ea0ea0f..c835199e777 100644 --- a/simulation/traffic_simulator/src/utils/pose.cpp +++ b/simulation/traffic_simulator/src/utils/pose.cpp @@ -52,7 +52,12 @@ auto canonicalize( if (lanelet_pose == LaneletPose()) { return std::nullopt; } else { - return CanonicalizedLaneletPose(lanelet_pose, hdmap_utils_ptr); + try { + return CanonicalizedLaneletPose(lanelet_pose, hdmap_utils_ptr); + } + catch(const common::SemanticError &) { + return std::nullopt; + } } }