ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

In short: there is not. Looking at the latest rclcpp API, I can also confirm that there is no equivalent there https://docs.ros2.org/latest/api/rclcpp/classrclcpp_1_1Node.html.

While I'm not entirely confident to say that it would never be added, from what I know of the mechanics of ROS2/DDS stack, I find it highly unlikely that it would ever be added. Please create a subscriber as you ordinarily would. It would not be terribly difficult to create an object that contains a subscriber, a callback, and a getLatestMsg() function to get the latest message to have a similar effect.

In short: there is not. Looking at the latest rclcpp API, I can also confirm that there is no equivalent there https://docs.ros2.org/latest/api/rclcpp/classrclcpp_1_1Node.html.

While I'm not entirely confident to say that it would never be added, from what I know of the mechanics of ROS2/DDS stack, I find it highly unlikely that it would ever be added. added - though your link suggests it may be possible through the C API so perhaps it will be exposed at the C++ level at some point. Please create a subscriber as you ordinarily would. It would not be terribly difficult to create an object that contains a subscriber, a callback, and a getLatestMsg() function to get the latest message to have a similar effect. effect.