Skip to content

Commit 35642a6

Browse files
sebekxSebastian Zęderowski
and
Sebastian Zęderowski
authored
fix(route_handler): exception in route_handler caused by int overflow (#6755)
Remove cast to int which might cause overflow Signed-off-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl> Co-authored-by: Sebastian Zęderowski <szederowski@autonomous-systems.pl>
1 parent 1eef4c0 commit 35642a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

planning/route_handler/src/route_handler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ PathWithLaneId RouteHandler::getCenterLinePath(
17081708

17091709
// append a point only when having one point so that yaw calculation would work
17101710
if (reference_path.points.size() == 1) {
1711-
const lanelet::Id lane_id = static_cast<int>(reference_path.points.front().lane_ids.front());
1711+
const lanelet::Id lane_id = reference_path.points.front().lane_ids.front();
17121712
const auto lanelet = lanelet_map_ptr_->laneletLayer.get(lane_id);
17131713
const auto point = reference_path.points.front().point.pose.position;
17141714
const auto lane_yaw = lanelet::utils::getLaneletAngle(lanelet, point);

0 commit comments

Comments
 (0)