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

Lifecycle node: the message transition_event is not in the node namespace #548

Closed
Myzhar opened this issue Sep 3, 2018 · 2 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Myzhar
Copy link

Myzhar commented Sep 3, 2018

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • Ardent
  • DDS implementation:
    • default from binaries
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

I created a Lyfecyclenode and I set this kind of default constructor:

myLyfeCycleNode::myLyfeCycleNode(const std::string& node_name, const std::string& ros_namespace, bool intra_process_comms)
        : rclcpp_lifecycle::LifecycleNode(node_name, ros_namespace, intra_process_comms)

I run the node using the following main function:

int main(int argc, char* argv[]) {
    // force flush of the stdout buffer.
    // this ensures a correct sync of all prints
    // even when executed simultaneously within the launch file.
    setvbuf(stdout, NULL, _IONBF, BUFSIZ);

    rclcpp::init(argc, argv);
    rclcpp::executors::SingleThreadedExecutor exe;

    std::shared_ptr<myLyfeCycleNode> lc_node =
        std::make_shared<myLyfeCycleNode>("myNode", "myNamespace");

    exe.add_node(lc_node->get_node_base_interface());
    exe.spin();

    rclcpp::shutdown();

    return 0;
}

Expected behavior

Running the command
$ ros2 topic list
I expect to see:
/myNamespace/myNode/transition_event

Actual behavior

Running the command
$ ros2 topic list
I see:
/myNode/transition_event

@dirk-thomas
Copy link
Member

dirk-thomas commented Sep 3, 2018

This looks like a duplicate of ros2/rmw#142.

@dirk-thomas dirk-thomas added bug Something isn't working duplicate This issue or pull request already exists labels Sep 3, 2018
@dirk-thomas
Copy link
Member

With the referenced changes merged this seems to be resolved:

  • ros2 run lifecycle lifecycle_talker __ns:=/my_namespace
  • ros2 topic list reports:
    /my_namespace/lc_talker/transition_event

DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants