Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map): add launch_pointcloud_map_loader #6290

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion launch/tier4_map_launch/launch/map.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
<let name="container_type" value="component_container" unless="$(var use_multithread)"/>
<let name="container_type" value="component_container_mt" if="$(var use_multithread)"/>

<!-- whether use pointcloud map -->
<arg name="launch_pointcloud_map_loader" default="true" description="launch pointcloud map loader"/>

<group>
<push-ros-namespace namespace="map"/>

<node_container pkg="rclcpp_components" exec="$(var container_type)" name="map_container" namespace="" output="screen">
<composable_node pkg="map_loader" plugin="PointCloudMapLoaderNode" name="pointcloud_map_loader">
<composable_node pkg="map_loader" plugin="PointCloudMapLoaderNode" name="pointcloud_map_loader" if="$(var launch_pointcloud_map_loader)">
<param from="$(var pointcloud_map_loader_param_path)"/>
<param name="pcd_paths_or_directory" value="[$(var pointcloud_map_path)]"/>
<param name="pcd_metadata_path" value="$(var pointcloud_map_metadata_path)"/>
Expand Down
5 changes: 3 additions & 2 deletions map/map_height_fitter/src/map_height_fitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ MapHeightFitter::Impl::Impl(rclcpp::Node * node) : tf2_listener_(tf2_buffer_), n

const auto map_loader_name = node->declare_parameter<std::string>("map_loader_name");
params_map_loader_ = rclcpp::AsyncParametersClient::make_shared(node, map_loader_name);
params_map_loader_->wait_for_service();
params_map_loader_->get_parameters({enable_partial_load}, callback);
if (params_map_loader_->wait_for_service(std::chrono::seconds(5.0))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this time may not be sufficient. I need better way

params_map_loader_->get_parameters({enable_partial_load}, callback);
}
}

void MapHeightFitter::Impl::on_map(const sensor_msgs::msg::PointCloud2::ConstSharedPtr msg)
Expand Down