Skip to content

Commit 59de6ff

Browse files
committed
change qos for distributed services to reliable
1 parent f8976fc commit 59de6ff

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

controller_manager/src/controller_manager.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ rclcpp::QoS qos_services =
4949
.reliable()
5050
.durability_volatile();
5151

52-
rclcpp::QoSInitialization qos_profile_services_keep_all_persist_init(
53-
RMW_QOS_POLICY_HISTORY_KEEP_ALL, 1);
54-
rclcpp::QoS qos_profile_services_keep_all(qos_profile_services_keep_all_persist_init);
55-
5652
inline bool is_controller_inactive(const controller_interface::ControllerInterfaceBase & controller)
5753
{
5854
return controller.get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE;
@@ -591,6 +587,11 @@ void ControllerManager::init_distributed_central_controller_manager()
591587

592588
void ControllerManager::init_distributed_central_controller_manager_services()
593589
{
590+
rclcpp::QoS qos_distributed_services_keep_10 =
591+
rclcpp::QoS(rclcpp::QoSInitialization(RMW_QOS_POLICY_HISTORY_KEEP_ALL, 10))
592+
.reliable()
593+
.durability_volatile();
594+
594595
distributed_system_srv_callback_group_ =
595596
create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
596597

@@ -600,15 +601,15 @@ void ControllerManager::init_distributed_central_controller_manager_services()
600601
std::bind(
601602
&ControllerManager::register_sub_controller_manager_srv_cb, this, std::placeholders::_1,
602603
std::placeholders::_2),
603-
qos_profile_services_keep_all, distributed_system_srv_callback_group_);
604+
qos_distributed_services_keep_10, distributed_system_srv_callback_group_);
604605

605606
register_sub_controller_manager_references_srv_ =
606607
create_service<controller_manager_msgs::srv::RegisterSubControllerManagerReferences>(
607608
"register_sub_controller_manager_references",
608609
std::bind(
609610
&ControllerManager::register_sub_controller_manager_references_srv_cb, this,
610611
std::placeholders::_1, std::placeholders::_2),
611-
qos_profile_services_keep_all, distributed_system_srv_callback_group_);
612+
qos_distributed_services_keep_10, distributed_system_srv_callback_group_);
612613
}
613614

614615
void ControllerManager::register_sub_controller_manager_srv_cb(

0 commit comments

Comments
 (0)