Skip to content

Commit 1275f6f

Browse files
StepTurtleMehmet Dogru
authored and
Mehmet Dogru
committed
Update declare parameters
Signed-off-by: Barış Zeren <[email protected]>
1 parent e8d80c0 commit 1275f6f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ Lanelet2MapLoaderNode::Lanelet2MapLoaderNode(const rclcpp::NodeOptions & options
8383
declare_parameter("lanelet2_map_path", "");
8484
declare_parameter("center_line_resolution");
8585

86-
std::vector<std::string> tmp_lanelet2_paths_or_directory =
87-
declare_parameter<std::vector<std::string>>("lanelet2_map_folder_path");
88-
std::string tmp_lanelet2_map_metadata_path =
89-
declare_parameter<std::string>("lanelet2_map_metadata_path");
9086
if (declare_parameter<bool>("enabled_dynamic_lanelet_loading")) {
87+
std::vector<std::string> lanelet2_paths_or_directory =
88+
declare_parameter<std::vector<std::string>>("lanelet2_map_folder_path");
89+
std::string lanelet2_map_metadata_path =
90+
declare_parameter<std::string>("lanelet2_map_metadata_path");
91+
9192
std::map<std::string, Lanelet2FileMetaData> lanelet2_metadata_dict;
9293
try {
9394
lanelet2_metadata_dict = getLanelet2Metadata(
94-
tmp_lanelet2_map_metadata_path, getLanelet2Paths(tmp_lanelet2_paths_or_directory));
95+
lanelet2_map_metadata_path, getLanelet2Paths(lanelet2_paths_or_directory));
9596
} catch (std::runtime_error & e) {
9697
RCLCPP_ERROR_STREAM(get_logger(), "Failed to load lanelet2 metadata");
9798
}

0 commit comments

Comments
 (0)