private nodehandles in ros 2
Will ros 2 support anything similar to private nodehandle concept of ROS 1 ?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Will ros 2 support anything similar to private nodehandle concept of ROS 1 ?
The same syntax can be used in ROS 2 as in ROS 1, e.g. ~/chatter
will become /node_namespace/node_name/chatter
. See:
http://design.ros2.org/articles/topic...
EDIT:
Sorry, I guess you mean the roscpp::NodeHandle
object in C++, right now we don't have that, but it's possible we could have it in the future.
In stead, if ROS 1 code used to do something like:
NodeHandle pnh("~");
pnh.advertise<...>("chatter", ...);
In ROS 2, you'd need to instead do:
auto node = std::make_shared<rclcpp::Node>("...", ...);
node->create_publisher<...>("~/chatter", ...);
Asked: 2018-06-19 05:38:07 -0500
Seen: 1,674 times
Last updated: Jun 19 '18
rclcpp api changes, removal of rclcpp::executor::Executor
Setting logging directory per Node in Foxy
Scope Resolution problem in the ROS2 migration guide
[ros2][humble] Service callback blocks subscriber with MultiThreadedExecutor
Run ros2 node using launch file with delay
how to organize data transfer between nodes on multiple PCs on ROS2
ros2 run - symbol not found on custom msg
ROS2 Nav2 Not Starting with namespace
AMCL cannot publish a pose or update the transform. Please set the initial pose...
ROS2 Foxy composable node: Failed to load component due to undefined symbol