how many cases the error “new node registered with same name” will be reported?

asked 2020-08-26 22:10:38 -0500

shike15 gravatar image

updated 2020-08-27 23:28:09 -0500

  • Configuration

    • ROS kinetic
    • Ubuntu 16.04
  • Issue details

Hi all, when I start all ros nodes of my robotic system, sometimes I will see the "new node" error in one node's log, for example:

[ WARN] [1598342227.977271227]: Shutdown request received.
[ WARN] [1598342227.977317667]: Reason given for shutdown: [new node registered with same name]

I am sure that there are no nodes with the same name, because the error does not appear each time.

And, I have modify the source code here ([https://github.com/ros/ros_comm/blob/...]), just add log to debug this issue,the codes are below:

        if node_ref.api == caller_api:
            return node_ref, False
        else:
            self.logger.warn("new node registered with same name: [%s, %s] => [%s, %s]",
                             node_ref.id, node_ref.api, caller_id, caller_api)
            bumped_api = node_ref.api
            self.thread_pool.queue_task(bumped_api, shutdown_node_task,
                                        (bumped_api, caller_id, "new node registered with same name"))

When I meet this error again after the log has benn added, I check the master log, but I can not find the log I have added, so maybe the error is not sent from here.

So, I want to ask for help, except here, is there any other cases the error “new node registered with same name” will be sent or reported?

Thanks a lot!

edit retag flag offensive close merge delete