Skip to content

Commit

Permalink
catch common::SemanticError inside traffic_simulator::pose::canonical…
Browse files Browse the repository at this point in the history
…ize function

Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Dec 23, 2024
1 parent 13b1d0d commit 817efa8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simulation/traffic_simulator/src/utils/pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 817efa8

Please sign in to comment.