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

Kurtoid's profile - activity

2021-05-17 10:02:06 -0500 received badge  Famous Question (source)
2021-02-12 21:36:22 -0500 marked best answer How can I set a node name when using composing nodes with rclcpp?

I'm initializing nodes like so:

 rclcpp::executors::SingleThreadedExecutor exec;
 std::vector<rclcpp::Parameter> laser_params = {rclcpp::Parameter("ip_address", "192.168.0.11")};
 rclcpp::NodeOptions laser_options;
 laser_options.parameter_overrides(laser_params);
 auto laser_node = std::make_shared<urg_node::UrgNode>(laser_options);
 exec.add_node(laser_node);

Which works fine, until I add a second node of the same type. I feel like I should be able to pass in a name argument to the node constructor, similar to rclcpp::Node. I noticed that many ros2-included nodes, like laser_proc and urg_node have hardcoded node names. For now, I've modified urg_node's constructor to have a name argument, which works, but I don't feel like I'm supposed to do this for all other nodes as well.

When using a launch.py file with ComposableNodeContainer and ComposableNode, I can pass a name argument to a node and be done with it.

How should I set a node name when running nodes in rclcpp?

2021-02-12 21:36:22 -0500 received badge  Scholar (source)
2021-01-31 13:09:38 -0500 received badge  Supporter (source)
2021-01-27 04:53:04 -0500 received badge  Notable Question (source)
2021-01-18 14:29:15 -0500 received badge  Enthusiast
2021-01-08 19:29:30 -0500 received badge  Popular Question (source)
2021-01-07 21:49:44 -0500 edited question How can I set a node name when using composing nodes with rclcpp?

How can I set a node name when using composing nodes with rclcpp? I'm initializing nodes like so: rclcpp::executors::S

2021-01-07 21:47:40 -0500 received badge  Famous Question (source)
2021-01-07 21:34:07 -0500 commented question How can I set a node name when using composing nodes with rclcpp?

I think I'm supposed to be remapping something, but I don't know how.

2021-01-07 21:33:52 -0500 answered a question How can I set a node name when using composing nodes with rclcpp?

I think I'm supposed to be remapping something, but I don't know how.

2021-01-07 21:33:52 -0500 received badge  Rapid Responder (source)
2021-01-07 21:33:10 -0500 edited question How can I set a node name when using composing nodes with rclcpp?

How can I set a node name when using composing nodes with rclcpp? I'm initializing nodes like so: rclcpp::executors::S

2021-01-07 21:33:10 -0500 received badge  Editor (source)
2021-01-07 21:31:34 -0500 asked a question How can I set a node name when using composing nodes with rclcpp?

How can I set a node name when using composing nodes with rclcpp? I'm initializing nodes like so: rclcpp::executors::S

2019-07-02 10:04:44 -0500 received badge  Notable Question (source)
2019-07-02 10:04:44 -0500 received badge  Popular Question (source)
2018-06-06 09:48:46 -0500 edited question gzserver segfaults when spawning DiffDriveController

gzserver segfaults when spawning DiffDriveController I'm following the URDF tutorial here and modified it to fit some st

2018-06-06 09:25:10 -0500 asked a question gzserver segfaults when spawning DiffDriveController

gzserver segfaults when spawning DiffDriveController I'm following the URDF tutorial here and modified it to fit some st