@@ -11,7 +11,8 @@ class MessagePublisherNode : public rclcpp::Node {
1111 public:
1212 MessagePublisherNode () : Node(" message_publisher_node" ) {
1313 this ->declare_parameter <std::string>(" input_type" , " odometry" );
14- this ->declare_parameter <std::string>(" topics.odometry" , " nautilus/odom" );
14+ this ->declare_parameter <std::string>(" topics.odometry" ,
15+ " nautilus/odom" );
1516 this ->declare_parameter <std::string>(" topics.waypoint" ,
1617 " nautilus/waypoint" );
1718 this ->declare_parameter <std::string>(" topics.reference_filter" ,
@@ -22,13 +23,16 @@ class MessagePublisherNode : public rclcpp::Node {
2223 auto input_type = this ->get_parameter (" input_type" ).as_string ();
2324 auto output_topic = this ->get_parameter (" topics.output" ).as_string ();
2425
25- rpy_pub_ =
26- this ->create_publisher <vortex_msgs::msg::RPY >(output_topic, 2 );
26+ rclcpp::QoS qos_profile (2 );
27+ qos_profile.best_effort ();
28+
29+ rpy_pub_ = this ->create_publisher <vortex_msgs::msg::RPY >(output_topic,
30+ qos_profile);
2731
2832 if (input_type == " odometry" ) {
2933 auto topic = this ->get_parameter (" topics.odometry" ).as_string ();
3034 sub_ = this ->create_subscription <nav_msgs::msg::Odometry>(
31- topic, 2 ,
35+ topic, qos_profile ,
3236 std::bind (&MessagePublisherNode::odom_callback, this ,
3337 std::placeholders::_1));
3438 RCLCPP_INFO (this ->get_logger (),
@@ -38,7 +42,7 @@ class MessagePublisherNode : public rclcpp::Node {
3842 } else if (input_type == " waypoint" ) {
3943 auto topic = this ->get_parameter (" topics.waypoint" ).as_string ();
4044 sub_ = this ->create_subscription <vortex_msgs::msg::Waypoint>(
41- topic, 2 ,
45+ topic, qos_profile ,
4246 std::bind (&MessagePublisherNode::waypoint_callback, this ,
4347 std::placeholders::_1));
4448 RCLCPP_INFO (this ->get_logger (),
@@ -50,7 +54,7 @@ class MessagePublisherNode : public rclcpp::Node {
5054 this ->get_parameter (" topics.reference_filter" ).as_string ();
5155 sub_ = this ->create_subscription <
5256 vortex_msgs::msg::ReferenceFilterQuat>(
53- topic, 2 ,
57+ topic, qos_profile ,
5458 std::bind (&MessagePublisherNode::ref_filter_callback, this ,
5559 std::placeholders::_1));
5660 RCLCPP_INFO (this ->get_logger (),
0 commit comments