diff --git a/rclcpp/include/rclcpp/node.hpp b/rclcpp/include/rclcpp/node.hpp index 7279a6a97e..d54ea21c5e 100644 --- a/rclcpp/include/rclcpp/node.hpp +++ b/rclcpp/include/rclcpp/node.hpp @@ -1124,19 +1124,6 @@ class Node : public std::enable_shared_from_this const rclcpp::NodeOptions & get_node_options() const; - /// Manually assert that this Node is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE). - /** - * If the rmw Liveliness policy is set to RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, the creator - * of this node may manually call `assert_liveliness` at some point in time to signal to the rest - * of the system that this Node is still alive. - * - * \return `true` if the liveliness was asserted successfully, otherwise `false` - */ - RCLCPP_PUBLIC - RCUTILS_WARN_UNUSED - bool - assert_liveliness() const; - protected: /// Construct a sub-node, which will extend the namespace of all entities created with it. /** diff --git a/rclcpp/include/rclcpp/node_interfaces/node_base.hpp b/rclcpp/include/rclcpp/node_interfaces/node_base.hpp index 73861df680..0e124f6f56 100644 --- a/rclcpp/include/rclcpp/node_interfaces/node_base.hpp +++ b/rclcpp/include/rclcpp/node_interfaces/node_base.hpp @@ -91,11 +91,6 @@ class NodeBase : public NodeBaseInterface RCLCPP_PUBLIC - bool - assert_liveliness() const override; - - RCLCPP_PUBLIC - rclcpp::CallbackGroup::SharedPtr create_callback_group(rclcpp::CallbackGroupType group_type) override; diff --git a/rclcpp/include/rclcpp/node_interfaces/node_base_interface.hpp b/rclcpp/include/rclcpp/node_interfaces/node_base_interface.hpp index 33e4ee3462..bcb469c0bf 100644 --- a/rclcpp/include/rclcpp/node_interfaces/node_base_interface.hpp +++ b/rclcpp/include/rclcpp/node_interfaces/node_base_interface.hpp @@ -102,12 +102,6 @@ class NodeBaseInterface std::shared_ptr get_shared_rcl_node_handle() const = 0; - /// Manually assert that this Node is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE). - RCLCPP_PUBLIC - virtual - bool - assert_liveliness() const = 0; - /// Create and return a callback group. RCLCPP_PUBLIC virtual diff --git a/rclcpp/src/rclcpp/node.cpp b/rclcpp/src/rclcpp/node.cpp index 29a25eb645..30804809a4 100644 --- a/rclcpp/src/rclcpp/node.cpp +++ b/rclcpp/src/rclcpp/node.cpp @@ -499,9 +499,3 @@ Node::get_node_options() const { return this->node_options_; } - -bool -Node::assert_liveliness() const -{ - return node_base_->assert_liveliness(); -} diff --git a/rclcpp/src/rclcpp/node_interfaces/node_base.cpp b/rclcpp/src/rclcpp/node_interfaces/node_base.cpp index 0bdf2342e5..f055abaa25 100644 --- a/rclcpp/src/rclcpp/node_interfaces/node_base.cpp +++ b/rclcpp/src/rclcpp/node_interfaces/node_base.cpp @@ -202,12 +202,6 @@ NodeBase::get_shared_rcl_node_handle() const return node_handle_; } -bool -NodeBase::assert_liveliness() const -{ - return RCL_RET_OK == rcl_node_assert_liveliness(get_rcl_node_handle()); -} - rclcpp::CallbackGroup::SharedPtr NodeBase::create_callback_group(rclcpp::CallbackGroupType group_type) { diff --git a/rclcpp/test/test_node.cpp b/rclcpp/test/test_node.cpp index e4851e17d8..3d034651ae 100644 --- a/rclcpp/test/test_node.cpp +++ b/rclcpp/test/test_node.cpp @@ -2591,7 +2591,7 @@ TEST_F(TestNode, get_publishers_subscriptions_info_by_topic) { RMW_QOS_POLICY_DURABILITY_VOLATILE, {15, 1678}, {29, 2345}, - RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, + RMW_QOS_POLICY_LIVELINESS_AUTOMATIC, {5, 23456}, false }; diff --git a/rclcpp/test/test_qos.cpp b/rclcpp/test/test_qos.cpp index b80c7763ca..7188119ceb 100644 --- a/rclcpp/test/test_qos.cpp +++ b/rclcpp/test/test_qos.cpp @@ -65,7 +65,7 @@ TEST(TestQoS, equality_liveliness) { EXPECT_NE(a, b); b.liveliness_lease_duration(duration); EXPECT_EQ(a, b); - a.liveliness(RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE); + a.liveliness(RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC); EXPECT_NE(a, b); }