Skip to content

Commit d0c6071

Browse files
sebekxSebastian Zęderowski
authored andcommitted
fix(route_handler): exception in route_handler caused by int overflow (autowarefoundation#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 d74c5ca commit d0c6071

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
@@ -1681,7 +1681,7 @@ PathWithLaneId RouteHandler::getCenterLinePath(
16811681

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

0 commit comments

Comments
 (0)