@@ -262,12 +262,14 @@ ElevationMappingNode::ElevationMappingNode(const rclcpp::NodeOptions& options)
262262
263263 gridMap_.setFrameId (mapFrameId_);
264264
265- rawSubmapService_ = this ->create_service <grid_map_msgs::srv::GetGridMap>(" get_raw_submap" , std::bind (&ElevationMappingNode::getSubmap, this , std::placeholders::_1, std::placeholders::_2));
266- clearMapService_ = this ->create_service <std_srvs::srv::Empty>(" clear_map" , std::bind (&ElevationMappingNode::clearMap, this , std::placeholders::_1, std::placeholders::_2));
267- initializeMapService_ = this ->create_service <elevation_map_msgs::srv::Initialize>(" initialize" , std::bind (&ElevationMappingNode::initializeMap, this , std::placeholders::_1, std::placeholders::_2));
268- clearMapWithInitializerService_ = this ->create_service <std_srvs::srv::Empty>(" clear_map_with_initializer" , std::bind (&ElevationMappingNode::clearMapWithInitializer, this , std::placeholders::_1, std::placeholders::_2));
269- setPublishPointService_ = this ->create_service <std_srvs::srv::SetBool>(" set_publish_points" , std::bind (&ElevationMappingNode::setPublishPoint, this , std::placeholders::_1, std::placeholders::_2));
270- checkSafetyService_ = this ->create_service <elevation_map_msgs::srv::CheckSafety>(" check_safety" , std::bind (&ElevationMappingNode::checkSafety, this , std::placeholders::_1, std::placeholders::_2));
265+ servicesCallbackGroup_ = this ->create_callback_group (rclcpp::CallbackGroupType::MutuallyExclusive);
266+
267+ rawSubmapService_ = this ->create_service <grid_map_msgs::srv::GetGridMap>(" get_raw_submap" , std::bind (&ElevationMappingNode::getSubmap, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
268+ clearMapService_ = this ->create_service <std_srvs::srv::Empty>(" clear_map" , std::bind (&ElevationMappingNode::clearMap, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
269+ initializeMapService_ = this ->create_service <elevation_map_msgs::srv::Initialize>(" initialize" , std::bind (&ElevationMappingNode::initializeMap, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
270+ clearMapWithInitializerService_ = this ->create_service <std_srvs::srv::Empty>(" clear_map_with_initializer" , std::bind (&ElevationMappingNode::clearMapWithInitializer, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
271+ setPublishPointService_ = this ->create_service <std_srvs::srv::SetBool>(" set_publish_points" , std::bind (&ElevationMappingNode::setPublishPoint, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
272+ checkSafetyService_ = this ->create_service <elevation_map_msgs::srv::CheckSafety>(" check_safety" , std::bind (&ElevationMappingNode::checkSafety, this , std::placeholders::_1, std::placeholders::_2), rmw_qos_profile_services_default, servicesCallbackGroup_);
271273
272274 if (updateVarianceFps > 0 ) {
273275 updateVarianceTimer_ = this ->create_wall_timer (std::chrono::duration<double >(1.0 / (updateVarianceFps + 0.00001 )), std::bind (&ElevationMappingNode::updateVariance, this ));
0 commit comments