@@ -245,7 +245,8 @@ StaticCenterlineGeneratorNode::StaticCenterlineGeneratorNode(
245
245
if (centerline_source_param == " optimization_trajectory_base" ) {
246
246
optimization_trajectory_based_centerline_ = OptimizationTrajectoryBasedCenterline (*this );
247
247
return CenterlineSource::OptimizationTrajectoryBase;
248
- } else if (centerline_source_param == " bag_ego_trajectory_base" ) {
248
+ }
249
+ if (centerline_source_param == " bag_ego_trajectory_base" ) {
249
250
return CenterlineSource::BagEgoTrajectoryBase;
250
251
}
251
252
throw std::logic_error (
@@ -304,7 +305,8 @@ CenterlineWithRoute StaticCenterlineGeneratorNode::generate_centerline_with_rout
304
305
optimization_trajectory_based_centerline_.generate_centerline_with_optimization (
305
306
*this , *route_handler_ptr_, route_lane_ids);
306
307
return CenterlineWithRoute{optimized_centerline, route_lane_ids};
307
- } else if (centerline_source_ == CenterlineSource::BagEgoTrajectoryBase) {
308
+ }
309
+ if (centerline_source_ == CenterlineSource::BagEgoTrajectoryBase) {
308
310
const auto bag_centerline = generate_centerline_with_bag (*this );
309
311
const auto start_lanelets =
310
312
route_handler_ptr_->getClosestLanelets (bag_centerline.front ().pose );
@@ -435,14 +437,14 @@ std::vector<lanelet::Id> StaticCenterlineGeneratorNode::plan_route(
435
437
mission_planner->initialize (&node, map_bin_ptr_);
436
438
437
439
// plan route
438
- const auto route = mission_planner->plan (check_points);
440
+ auto route = mission_planner->plan (check_points);
439
441
440
442
return route;
441
443
}();
442
444
RCLCPP_INFO (get_logger (), " Planned route." );
443
445
444
446
// get lanelets
445
- const auto route_lane_ids = get_lane_ids_from_route (route);
447
+ auto route_lane_ids = get_lane_ids_from_route (route);
446
448
return route_lane_ids;
447
449
}
448
450
0 commit comments