Skip to content

Commit 6e2ab96

Browse files
authored
fix: fix data types for lane ids (#4096)
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
1 parent 3ca00b2 commit 6e2ab96

File tree

24 files changed

+81
-74
lines changed

24 files changed

+81
-74
lines changed

control/lane_departure_checker/src/lane_departure_checker_node/lane_departure_checker_node.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ std::array<geometry_msgs::msg::Point, 3> triangle2points(
5353
return points;
5454
}
5555

56-
std::map<int, lanelet::ConstLanelet> getRouteLanelets(
56+
std::map<lanelet::Id, lanelet::ConstLanelet> getRouteLanelets(
5757
const lanelet::LaneletMapPtr & lanelet_map,
5858
const lanelet::routing::RoutingGraphPtr & routing_graph,
5959
const autoware_planning_msgs::msg::LaneletRoute::ConstSharedPtr & route_ptr,
6060
const double vehicle_length)
6161
{
62-
std::map<int, lanelet::ConstLanelet> route_lanelets;
62+
std::map<lanelet::Id, lanelet::ConstLanelet> route_lanelets;
6363

6464
bool is_route_valid = lanelet::utils::route::isRouteValid(*route_ptr, lanelet_map);
6565
if (!is_route_valid) {
@@ -315,7 +315,7 @@ void LaneDepartureCheckerNode::onTimer()
315315

316316
// In order to wait for both of map and route will be ready, write this not in callback but here
317317
if (last_route_ != route_ && !route_->segments.empty()) {
318-
std::map<int, lanelet::ConstLanelet>::iterator itr;
318+
std::map<lanelet::Id, lanelet::ConstLanelet>::iterator itr;
319319

320320
auto map_route_lanelets_ =
321321
getRouteLanelets(lanelet_map_, routing_graph_, route_, vehicle_length_m_);

planning/behavior_path_planner/include/behavior_path_planner/utils/lane_change/lane_change_path.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ struct LaneChangeStatus
4242
LaneChangePath lane_change_path{};
4343
lanelet::ConstLanelets current_lanes{};
4444
lanelet::ConstLanelets target_lanes{};
45-
std::vector<uint64_t> lane_follow_lane_ids{};
46-
std::vector<uint64_t> lane_change_lane_ids{};
45+
std::vector<lanelet::Id> lane_follow_lane_ids{};
46+
std::vector<lanelet::Id> lane_change_lane_ids{};
4747
bool is_safe{false};
4848
bool is_valid_path{true};
4949
double start_distance{0.0};

planning/behavior_path_planner/include/behavior_path_planner/utils/utils.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ FrenetPoint convertToFrenetPoint(
122122
return frenet_point;
123123
}
124124

125-
std::vector<uint64_t> getIds(const lanelet::ConstLanelets & lanelets);
125+
std::vector<lanelet::Id> getIds(const lanelet::ConstLanelets & lanelets);
126126

127127
// distance (arclength) calculation
128128

planning/behavior_path_planner/src/utils/utils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,9 @@ double getSignedDistance(
778778
return arc_goal.length - arc_current.length;
779779
}
780780

781-
std::vector<uint64_t> getIds(const lanelet::ConstLanelets & lanelets)
781+
std::vector<lanelet::Id> getIds(const lanelet::ConstLanelets & lanelets)
782782
{
783-
std::vector<uint64_t> ids;
783+
std::vector<lanelet::Id> ids;
784784
ids.reserve(lanelets.size());
785785
for (const auto & llt : lanelets) {
786786
ids.push_back(llt.id());
@@ -1274,7 +1274,7 @@ lanelet::ConstLanelets getCurrentLanesFromPath(
12741274
const auto & current_pose = planner_data->self_odometry->pose.pose;
12751275
const auto & p = planner_data->parameters;
12761276

1277-
std::set<uint64_t> lane_ids;
1277+
std::set<lanelet::Id> lane_ids;
12781278
for (const auto & p : path.points) {
12791279
for (const auto & id : p.lane_ids) {
12801280
lane_ids.insert(id);

planning/behavior_velocity_blind_spot_module/src/scene.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ bool BlindSpotModule::isTargetObjectType(
629629
}
630630

631631
boost::optional<geometry_msgs::msg::Pose> BlindSpotModule::getStartPointFromLaneLet(
632-
const int lane_id) const
632+
const lanelet::Id lane_id) const
633633
{
634634
lanelet::ConstLanelet lanelet =
635635
planner_data_->route_handler_->getLaneletMapPtr()->laneletLayer.get(lane_id);
@@ -653,7 +653,7 @@ boost::optional<geometry_msgs::msg::Pose> BlindSpotModule::getStartPointFromLane
653653

654654
lanelet::ConstLanelets BlindSpotModule::getStraightLanelets(
655655
lanelet::LaneletMapConstPtr lanelet_map_ptr, lanelet::routing::RoutingGraphPtr routing_graph_ptr,
656-
const int lane_id)
656+
const lanelet::Id lane_id)
657657
{
658658
lanelet::ConstLanelets straight_lanelets;
659659
const auto intersection_lanelet = lanelet_map_ptr->laneletLayer.get(lane_id);

planning/behavior_velocity_blind_spot_module/src/scene.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,15 @@ class BlindSpotModule : public SceneModuleInterface
201201
* @param lane_id lane id of objective lanelet
202202
* @return end point of lanelet
203203
*/
204-
boost::optional<geometry_msgs::msg::Pose> getStartPointFromLaneLet(const int lane_id) const;
204+
boost::optional<geometry_msgs::msg::Pose> getStartPointFromLaneLet(
205+
const lanelet::Id lane_id) const;
205206

206207
/**
207208
* @brief get straight lanelets in intersection
208209
*/
209210
lanelet::ConstLanelets getStraightLanelets(
210211
lanelet::LaneletMapConstPtr lanelet_map_ptr,
211-
lanelet::routing::RoutingGraphPtr routing_graph_ptr, const int lane_id);
212+
lanelet::routing::RoutingGraphPtr routing_graph_ptr, const lanelet::Id lane_id);
212213

213214
/**
214215
* @brief Modify objects predicted path. remove path point if the time exceeds timer_thr.

planning/behavior_velocity_crosswalk_module/include/behavior_velocity_crosswalk_module/util.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ std::vector<geometry_msgs::msg::Point> getLinestringIntersects(
105105
const geometry_msgs::msg::Point & ego_pos, const size_t max_num);
106106

107107
std::optional<lanelet::ConstLineString3d> getStopLineFromMap(
108-
const int lane_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,
108+
const lanelet::Id lane_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,
109109
const std::string & attribute_name);
110110
} // namespace behavior_velocity_planner
111111

planning/behavior_velocity_crosswalk_module/src/util.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ std::vector<geometry_msgs::msg::Point> getLinestringIntersects(
209209
}
210210

211211
std::optional<lanelet::ConstLineString3d> getStopLineFromMap(
212-
const int lane_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,
212+
const lanelet::Id lane_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,
213213
const std::string & attribute_name)
214214
{
215215
lanelet::ConstLanelet lanelet = lanelet_map_ptr->laneletLayer.get(lane_id);

planning/behavior_velocity_intersection_module/src/scene_intersection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static bool isTargetCollisionVehicleType(
9595
IntersectionModule::IntersectionModule(
9696
const int64_t module_id, const int64_t lane_id,
9797
[[maybe_unused]] std::shared_ptr<const PlannerData> planner_data,
98-
const PlannerParam & planner_param, const std::set<int> & associative_ids,
98+
const PlannerParam & planner_param, const std::set<lanelet::Id> & associative_ids,
9999
const std::string & turn_direction, const bool has_traffic_light,
100100
const bool enable_occlusion_detection, const bool is_private_area, rclcpp::Node & node,
101101
const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock)

planning/behavior_velocity_intersection_module/src/scene_intersection.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class IntersectionModule : public SceneModuleInterface
259259

260260
IntersectionModule(
261261
const int64_t module_id, const int64_t lane_id, std::shared_ptr<const PlannerData> planner_data,
262-
const PlannerParam & planner_param, const std::set<int> & associative_ids,
262+
const PlannerParam & planner_param, const std::set<lanelet::Id> & associative_ids,
263263
const std::string & turn_direction, const bool has_traffic_light,
264264
const bool enable_occlusion_detection, const bool is_private_area, rclcpp::Node & node,
265265
const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock);
@@ -273,7 +273,7 @@ class IntersectionModule : public SceneModuleInterface
273273
visualization_msgs::msg::MarkerArray createDebugMarkerArray() override;
274274
motion_utils::VirtualWalls createVirtualWalls() override;
275275

276-
const std::set<int> & getAssociativeIds() const { return associative_ids_; }
276+
const std::set<lanelet::Id> & getAssociativeIds() const { return associative_ids_; }
277277

278278
UUID getOcclusionUUID() const { return occlusion_uuid_; }
279279
bool getOcclusionSafety() const { return occlusion_safety_; }
@@ -284,7 +284,7 @@ class IntersectionModule : public SceneModuleInterface
284284
private:
285285
rclcpp::Node & node_;
286286
const int64_t lane_id_;
287-
const std::set<int> associative_ids_;
287+
const std::set<lanelet::Id> associative_ids_;
288288
const std::string turn_direction_;
289289
const bool has_traffic_light_;
290290

planning/behavior_velocity_intersection_module/src/scene_merge_from_private_road.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace bg = boost::geometry;
3939
MergeFromPrivateRoadModule::MergeFromPrivateRoadModule(
4040
const int64_t module_id, const int64_t lane_id,
4141
[[maybe_unused]] std::shared_ptr<const PlannerData> planner_data,
42-
const PlannerParam & planner_param, const std::set<int> & associative_ids,
42+
const PlannerParam & planner_param, const std::set<lanelet::Id> & associative_ids,
4343
const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock)
4444
: SceneModuleInterface(module_id, logger, clock),
4545
lane_id_(lane_id),

planning/behavior_velocity_intersection_module/src/scene_merge_from_private_road.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class MergeFromPrivateRoadModule : public SceneModuleInterface
6666

6767
MergeFromPrivateRoadModule(
6868
const int64_t module_id, const int64_t lane_id, std::shared_ptr<const PlannerData> planner_data,
69-
const PlannerParam & planner_param, const std::set<int> & associative_ids,
69+
const PlannerParam & planner_param, const std::set<lanelet::Id> & associative_ids,
7070
const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock);
7171

7272
/**
@@ -78,11 +78,11 @@ class MergeFromPrivateRoadModule : public SceneModuleInterface
7878
visualization_msgs::msg::MarkerArray createDebugMarkerArray() override;
7979
motion_utils::VirtualWalls createVirtualWalls() override;
8080

81-
const std::set<int> & getAssociativeIds() const { return associative_ids_; }
81+
const std::set<lanelet::Id> & getAssociativeIds() const { return associative_ids_; }
8282

8383
private:
8484
const int64_t lane_id_;
85-
const std::set<int> associative_ids_;
85+
const std::set<lanelet::Id> associative_ids_;
8686

8787
autoware_auto_planning_msgs::msg::PathWithLaneId extractPathNearExitOfPrivateRoad(
8888
const autoware_auto_planning_msgs::msg::PathWithLaneId & path, const double extend_length);

planning/behavior_velocity_intersection_module/src/util.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ static std::optional<size_t> insertPointIndex(
117117
}
118118

119119
bool hasLaneIds(
120-
const autoware_auto_planning_msgs::msg::PathPointWithLaneId & p, const std::set<int> & ids)
120+
const autoware_auto_planning_msgs::msg::PathPointWithLaneId & p,
121+
const std::set<lanelet::Id> & ids)
121122
{
122123
for (const auto & pid : p.lane_ids) {
123124
if (ids.find(pid) != ids.end()) {
@@ -128,7 +129,7 @@ bool hasLaneIds(
128129
}
129130

130131
std::optional<std::pair<size_t, size_t>> findLaneIdsInterval(
131-
const autoware_auto_planning_msgs::msg::PathWithLaneId & p, const std::set<int> & ids)
132+
const autoware_auto_planning_msgs::msg::PathWithLaneId & p, const std::set<lanelet::Id> & ids)
132133
{
133134
bool found = false;
134135
size_t start = 0;
@@ -684,7 +685,7 @@ mergeLaneletsByTopologicalSort(
684685
IntersectionLanelets getObjectiveLanelets(
685686
lanelet::LaneletMapConstPtr lanelet_map_ptr, lanelet::routing::RoutingGraphPtr routing_graph_ptr,
686687
const lanelet::ConstLanelet assigned_lanelet, const lanelet::ConstLanelets & lanelets_on_path,
687-
const std::set<int> & associative_ids, const double detection_area_length,
688+
const std::set<lanelet::Id> & associative_ids, const double detection_area_length,
688689
const double occlusion_detection_area_length, const bool consider_wrong_direction_vehicle)
689690
{
690691
const auto turn_direction = assigned_lanelet.attributeOr("turn_direction", "else");
@@ -1098,7 +1099,7 @@ std::vector<lanelet::ConstLineString3d> generateDetectionLaneDivisions(
10981099
}
10991100

11001101
std::optional<InterpolatedPathInfo> generateInterpolatedPath(
1101-
const int lane_id, const std::set<int> & associative_lane_ids,
1102+
const lanelet::Id lane_id, const std::set<lanelet::Id> & associative_lane_ids,
11021103
const autoware_auto_planning_msgs::msg::PathWithLaneId & input_path, const double ds,
11031104
const rclcpp::Logger logger)
11041105
{
@@ -1315,7 +1316,7 @@ void cutPredictPathWithDuration(
13151316
TimeDistanceArray calcIntersectionPassingTime(
13161317
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
13171318
const std::shared_ptr<const PlannerData> & planner_data, const lanelet::Id lane_id,
1318-
const std::set<int> & associative_ids, const size_t closest_idx,
1319+
const std::set<lanelet::Id> & associative_ids, const size_t closest_idx,
13191320
const size_t last_intersection_stop_line_candidate_idx, const double time_delay,
13201321
const double intersection_velocity, const double minimum_ego_velocity,
13211322
const bool use_upstream_velocity, const double minimum_upstream_velocity,
@@ -1496,7 +1497,7 @@ void IntersectionLanelets::update(
14961497
}
14971498

14981499
static lanelet::ConstLanelets getPrevLanelets(
1499-
const lanelet::ConstLanelets & lanelets_on_path, const std::set<int> & associative_ids)
1500+
const lanelet::ConstLanelets & lanelets_on_path, const std::set<lanelet::Id> & associative_ids)
15001501
{
15011502
lanelet::ConstLanelets previous_lanelets;
15021503
for (const auto & ll : lanelets_on_path) {
@@ -1541,7 +1542,8 @@ lanelet::ConstLanelet generatePathLanelet(
15411542

15421543
std::optional<PathLanelets> generatePathLanelets(
15431544
const lanelet::ConstLanelets & lanelets_on_path,
1544-
const util::InterpolatedPathInfo & interpolated_path_info, const std::set<int> & associative_ids,
1545+
const util::InterpolatedPathInfo & interpolated_path_info,
1546+
const std::set<lanelet::Id> & associative_ids,
15451547
const lanelet::CompoundPolygon3d & first_conflicting_area,
15461548
const std::vector<lanelet::CompoundPolygon3d> & conflicting_areas,
15471549
const std::optional<lanelet::CompoundPolygon3d> & first_attention_area,

planning/behavior_velocity_intersection_module/src/util.hpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ std::optional<size_t> insertPoint(
4040
autoware_auto_planning_msgs::msg::PathWithLaneId * inout_path);
4141

4242
bool hasLaneIds(
43-
const autoware_auto_planning_msgs::msg::PathPointWithLaneId & p, const std::set<int> & ids);
43+
const autoware_auto_planning_msgs::msg::PathPointWithLaneId & p,
44+
const std::set<lanelet::Id> & ids);
4445
std::optional<std::pair<size_t, size_t>> findLaneIdsInterval(
45-
const autoware_auto_planning_msgs::msg::PathWithLaneId & p, const std::set<int> & ids);
46+
const autoware_auto_planning_msgs::msg::PathWithLaneId & p, const std::set<lanelet::Id> & ids);
4647

4748
/**
4849
* @brief get objective polygons for detection area
4950
*/
5051
IntersectionLanelets getObjectiveLanelets(
5152
lanelet::LaneletMapConstPtr lanelet_map_ptr, lanelet::routing::RoutingGraphPtr routing_graph_ptr,
5253
const lanelet::ConstLanelet assigned_lanelet, const lanelet::ConstLanelets & lanelets_on_path,
53-
const std::set<int> & associative_ids, const double detection_area_length,
54+
const std::set<lanelet::Id> & associative_ids, const double detection_area_length,
5455
const double occlusion_detection_area_length, const bool consider_wrong_direction_vehicle);
5556

5657
/**
@@ -117,7 +118,7 @@ std::vector<lanelet::ConstLineString3d> generateDetectionLaneDivisions(
117118
const double curvature_threshold, const double curvature_calculation_ds);
118119

119120
std::optional<InterpolatedPathInfo> generateInterpolatedPath(
120-
const int lane_id, const std::set<int> & associative_lane_ids,
121+
const lanelet::Id lane_id, const std::set<lanelet::Id> & associative_lane_ids,
121122
const autoware_auto_planning_msgs::msg::PathWithLaneId & input_path, const double ds,
122123
const rclcpp::Logger logger);
123124

@@ -150,7 +151,7 @@ void cutPredictPathWithDuration(
150151
TimeDistanceArray calcIntersectionPassingTime(
151152
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
152153
const std::shared_ptr<const PlannerData> & planner_data, const lanelet::Id lane_id,
153-
const std::set<int> & associative_ids, const size_t closest_idx,
154+
const std::set<lanelet::Id> & associative_ids, const size_t closest_idx,
154155
const size_t last_intersection_stop_line_candidate_idx, const double time_delay,
155156
const double intersection_velocity, const double minimum_ego_velocity,
156157
const bool use_upstream_velocity, const double minimum_upstream_velocity,
@@ -166,7 +167,8 @@ lanelet::ConstLanelet generatePathLanelet(
166167

167168
std::optional<PathLanelets> generatePathLanelets(
168169
const lanelet::ConstLanelets & lanelets_on_path,
169-
const util::InterpolatedPathInfo & interpolated_path_info, const std::set<int> & associative_ids,
170+
const util::InterpolatedPathInfo & interpolated_path_info,
171+
const std::set<lanelet::Id> & associative_ids,
170172
const lanelet::CompoundPolygon3d & first_conflicting_area,
171173
const std::vector<lanelet::CompoundPolygon3d> & conflicting_areas,
172174
const std::optional<lanelet::CompoundPolygon3d> & first_attention_area,

planning/behavior_velocity_intersection_module/src/util_type.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ struct InterpolatedPathInfo
6464
{
6565
autoware_auto_planning_msgs::msg::PathWithLaneId path;
6666
double ds{0.0};
67-
int lane_id{0};
68-
std::set<int> associative_lane_ids{};
67+
lanelet::Id lane_id{0};
68+
std::set<lanelet::Id> associative_lane_ids{};
6969
std::optional<std::pair<size_t, size_t>> lane_id_interval{std::nullopt};
7070
};
7171

@@ -175,7 +175,8 @@ struct PathLanelets
175175
lanelet::ConstLanelets all;
176176
lanelet::ConstLanelets
177177
conflicting_interval_and_remaining; // the left/right-most interval of path conflicting with
178-
// conflicting lanelets plus the next lane part of the path
178+
// conflicting lanelets plus the next lane part of the
179+
// path
179180
};
180181

181182
struct TargetObject

planning/behavior_velocity_planner_common/include/behavior_velocity_planner_common/utilization/util.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ boost::optional<geometry_msgs::msg::Pose> insertStopPoint(
224224
@brief return 'associative' lanes in the intersection. 'associative' means that a lane shares same
225225
or lane-changeable parent lanes with `lane` and has same turn_direction value.
226226
*/
227-
std::set<int> getAssociativeIntersectionLanelets(
227+
std::set<lanelet::Id> getAssociativeIntersectionLanelets(
228228
lanelet::ConstLanelet lane, const lanelet::LaneletMapPtr lanelet_map,
229229
const lanelet::routing::RoutingGraphPtr routing_graph);
230230

231231
template <template <class> class Container>
232232
lanelet::ConstLanelets getConstLaneletsFromIds(
233-
lanelet::LaneletMapConstPtr map, const Container<int> & ids)
233+
lanelet::LaneletMapConstPtr map, const Container<lanelet::Id> & ids)
234234
{
235235
lanelet::ConstLanelets ret{};
236236
for (const auto & id : ids) {

planning/behavior_velocity_planner_common/src/utilization/util.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ boost::optional<geometry_msgs::msg::Pose> insertStopPoint(
663663
return tier4_autoware_utils::getPose(output.points.at(insert_idx.get()));
664664
}
665665

666-
std::set<int> getAssociativeIntersectionLanelets(
666+
std::set<lanelet::Id> getAssociativeIntersectionLanelets(
667667
lanelet::ConstLanelet lane, const lanelet::LaneletMapPtr lanelet_map,
668668
const lanelet::routing::RoutingGraphPtr routing_graph)
669669
{
@@ -673,12 +673,12 @@ std::set<int> getAssociativeIntersectionLanelets(
673673
}
674674

675675
const auto parents = routing_graph->previous(lane);
676-
std::set<int> parent_neighbors;
676+
std::set<lanelet::Id> parent_neighbors;
677677
for (const auto & parent : parents) {
678678
const auto neighbors = routing_graph->besides(parent);
679679
for (const auto & neighbor : neighbors) parent_neighbors.insert(neighbor.id());
680680
}
681-
std::set<int> associative_intersection_lanelets;
681+
std::set<lanelet::Id> associative_intersection_lanelets;
682682
associative_intersection_lanelets.insert(lane.id());
683683
for (const auto & parent_neighbor_id : parent_neighbors) {
684684
const auto parent_neighbor = lanelet_map->laneletLayer.get(parent_neighbor_id);

planning/planning_test_utils/include/planning_interface_test_manager/planning_interface_test_manager_utils.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Scenario makeScenarioMsg(const std::string scenario)
268268
return scenario_msg;
269269
}
270270

271-
Pose createPoseFromLaneID(const int & lane_id)
271+
Pose createPoseFromLaneID(const lanelet::Id & lane_id)
272272
{
273273
auto map_bin_msg = makeMapBinMsg();
274274
// create route_handler
@@ -299,7 +299,7 @@ Pose createPoseFromLaneID(const int & lane_id)
299299
return middle_pose;
300300
}
301301

302-
Odometry makeInitialPoseFromLaneId(const int & lane_id)
302+
Odometry makeInitialPoseFromLaneId(const lanelet::Id & lane_id)
303303
{
304304
Odometry current_odometry;
305305
current_odometry.pose.pose = createPoseFromLaneID(lane_id);

planning/route_handler/src/route_handler.cpp

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

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

0 commit comments

Comments
 (0)