Skip to content

Commit

Permalink
Changing qos name
Browse files Browse the repository at this point in the history
Signed-off-by: CursedRock17 <mtglucas1@gmail.com>
  • Loading branch information
CursedRock17 committed Oct 3, 2023
1 parent 7a89724 commit bc4370b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/create_subscription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ create_subscription(
node_parameters,
node_topics_interface,
options.topic_stats_options.publish_topic,
options.topic_stats_options.statistics_qos_configuration);
options.topic_stats_options.qos);

subscription_topic_stats = std::make_shared<
rclcpp::topic_statistics::SubscriptionTopicStatistics<ROSMessageType>
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/subscription_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct SubscriptionOptionsBase

// An optional QoS which can provide topic_statistics with a stable QoS separate from
// the subscription's current QoS settings which could be unstable.
rclcpp::QoS statistics_qos_configuration = SystemDefaultsQoS();
rclcpp::QoS qos = SystemDefaultsQoS();
};

TopicStatisticsOptions topic_stats_options;
Expand Down
6 changes: 3 additions & 3 deletions rclcpp/test/rclcpp/test_subscription_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ TEST_F(TestSubscriptionOptions, topic_statistics_options_default_and_set) {
EXPECT_EQ(options.topic_stats_options.publish_topic, defaultPublishTopic);
EXPECT_EQ(options.topic_stats_options.publish_period, 1s);
EXPECT_EQ(
options.topic_stats_options.statistics_qos_configuration, rclcpp::SystemDefaultsQoS());
options.topic_stats_options.qos, rclcpp::SystemDefaultsQoS());

options.topic_stats_options.state = rclcpp::TopicStatisticsState::Enable;
options.topic_stats_options.publish_topic = "topic_statistics";
options.topic_stats_options.publish_period = 5min;
options.topic_stats_options.statistics_qos_configuration = rclcpp::BestAvailableQoS();
options.topic_stats_options.qos = rclcpp::BestAvailableQoS();

EXPECT_EQ(options.topic_stats_options.state, rclcpp::TopicStatisticsState::Enable);
EXPECT_EQ(options.topic_stats_options.publish_topic, "topic_statistics");
EXPECT_EQ(options.topic_stats_options.publish_period, 5min);
EXPECT_EQ(
options.topic_stats_options.statistics_qos_configuration, rclcpp::BestAvailableQoS());
options.topic_stats_options.qos, rclcpp::BestAvailableQoS());
}

TEST_F(TestSubscriptionOptions, topic_statistics_options_node_default_mode) {
Expand Down

0 comments on commit bc4370b

Please sign in to comment.