Skip to content

Commit e80970f

Browse files
committed
Add an exception when failed to get current lanelet in EgoEntity::requestAssignRoute
1 parent 2dc5a8a commit e80970f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

simulation/traffic_simulator/src/entity/ego_entity.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ void EgoEntity::requestAssignRoute(
265265
routing_configuration.allow_lane_change = true;
266266
if (auto current_lanelet_pose = getCanonicalizedLaneletPose()) {
267267
route_segments.push_back(make_segment(current_lanelet_pose->getLaneletId()));
268+
} else {
269+
throw common::Error(
270+
"Failed to get current lanelet of ego entity. (", __FILE__, ":", __LINE__, ")");
268271
}
269272

270273
for (size_t i = 0; i < route.size(); ++i) {

0 commit comments

Comments
 (0)