Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate node name for component_container results in warning #346

Closed
clalancette opened this issue May 22, 2019 · 2 comments · Fixed by ros2/rclcpp#736
Closed

Alternate node name for component_container results in warning #346

clalancette opened this issue May 22, 2019 · 2 comments · Fixed by ros2/rclcpp#736
Assignees
Labels
bug Something isn't working in review Waiting for review (Kanban column)

Comments

@clalancette
Copy link
Contributor

Bug report

I'm following the tutorial at https://index.ros.org/doc/ros2/Tutorials/Composition/#remapping-container-name-and-namespace . When I run the component_container with an alternate node name (by specifying __node:=MyContainer), I always get a warning when inserting components into the container.

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • Source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp_components

Steps to reproduce issue

In terminal 1:

ros2 run rclcpp_components component_container __node:=MyContainer

In terminal 2:

ros2 component load /MyContainer composition composition::Listener

Expected behavior

Composition Listener is loaded into the container without warnings.

Actual behavior

In the terminal running the component_container:

[INFO] [MyContainer]: Load Library: /home/ubuntu/ros2_ws/install/composition/lib/liblistener_component.so
[INFO] [MyContainer]: Found class: rclcpp_components::NodeFactoryTemplate<composition::Listener>
[INFO] [MyContainer]: Instantiate class: rclcpp_components::NodeFactoryTemplate<composition::Listener>
[WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.

Additional information

If I run the component_container without __node:=MyContainer, no error is shown. Also, using a namespace (__ns:=/ns) doesn't cause this to happen, only the change in node name.

@cottsay
Copy link
Member

cottsay commented May 22, 2019

I think that this is fundamentally the same issue as ros2/launch#204

@dirk-thomas dirk-thomas added bug Something isn't working in review Waiting for review (Kanban column) labels May 23, 2019
@dirk-thomas dirk-thomas self-assigned this May 23, 2019
@dirk-thomas
Copy link
Member

I think that this is fundamentally the same issue as ros2/launch#204

The referenced issue is specific to a single executable which contains multiple nodes. There is currently no way to pass node-specific arguments in that case and all arguments are used by all nodes.

This case is different where the manager (without any components) is started and can optionally use arguments. The later started components should not be subject to these arguments though (which they currently are, hence the warning).

See ros2/rclcpp#736 for the proposed fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants