@@ -97,6 +97,8 @@ bool Lanelet2DifferentialLoaderModule::differentialLanelet2Load(
97
97
}
98
98
}
99
99
100
+ lanelet::utils::overwriteLaneletsCenterline (map, 5.0 , false );
101
+
100
102
const auto map_bin_msg =
101
103
Lanelet2MapLoaderNode::create_map_bin_msg (map, lanelet2_paths[0 ], rclcpp::Clock ().now ());
102
104
@@ -113,24 +115,7 @@ bool Lanelet2DifferentialLoaderModule::differentialLanelet2Load(
113
115
}
114
116
}
115
117
116
- // overwrite local_x, local_y
117
- for (lanelet::Point3d point : map->pointLayer ) {
118
- if (point.hasAttribute (" local_x" )) {
119
- point.x () = point.attribute (" local_x" ).asDouble ().value ();
120
- }
121
- if (point.hasAttribute (" local_y" )) {
122
- point.y () = point.attribute (" local_y" ).asDouble ().value ();
123
- }
124
- }
125
-
126
- // realign lanelet borders using updated points
127
- for (lanelet::Lanelet lanelet : map->laneletLayer ) {
128
- auto left = lanelet.leftBound ();
129
- auto right = lanelet.rightBound ();
130
- std::tie (left, right) = lanelet::geometry::align (left, right);
131
- lanelet.setLeftBound (left);
132
- lanelet.setRightBound (right);
133
- }
118
+ lanelet::utils::overwriteLaneletsCenterline (map, 5.0 , false );
134
119
135
120
const auto map_bin_msg =
136
121
Lanelet2MapLoaderNode::create_map_bin_msg (map, lanelet2_paths[0 ], rclcpp::Clock ().now ());
0 commit comments