Skip to content

Commit

Permalink
sys_status: replace rmw_qos too
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed Jun 7, 2024
1 parent f6e92fe commit 10c97cd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mavros/src/plugins/sys_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,25 +588,31 @@ class SystemStatusPlugin : public plugin::Plugin

srv_cg = node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);

#ifdef USE_OLD_RMW_QOS
auto services_qos = rmw_qos_profile_services_default;
#else
auto services_qos = rclcpp::ServicesQoS();
#endif

mode_srv = node->create_service<mavros_msgs::srv::SetMode>(
"set_mode",
std::bind(
&SystemStatusPlugin::set_mode_cb, this, _1,
_2), rmw_qos_profile_services_default, srv_cg);
_2), services_qos, srv_cg);
stream_rate_srv = node->create_service<mavros_msgs::srv::StreamRate>(
"set_stream_rate",
std::bind(
&SystemStatusPlugin::set_rate_cb, this, _1,
_2), rmw_qos_profile_services_default, srv_cg);
_2), services_qos, srv_cg);
message_interval_srv = node->create_service<mavros_msgs::srv::MessageInterval>(
"set_message_interval",
std::bind(
&SystemStatusPlugin::set_message_interval_cb, this, _1,
_2), rmw_qos_profile_services_default, srv_cg);
_2), services_qos, srv_cg);
vehicle_info_get_srv = node->create_service<mavros_msgs::srv::VehicleInfoGet>(
"vehicle_info_get", std::bind(
&SystemStatusPlugin::vehicle_info_get_cb, this, _1,
_2), rmw_qos_profile_services_default, srv_cg);
_2), services_qos, srv_cg);

uas->diagnostic_updater.add(hb_diag);

Expand Down

0 comments on commit 10c97cd

Please sign in to comment.