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

Change behavior of killing nodes with same name

asked 2018-06-24 06:17:15 -0600

tik0 gravatar image

Any node which is already running with some name my_node_name will be killed if I run any node with the same name via rosrun and roslaunch.

Example:

# First terminal
rosrun rviz rviz __name:=rviz

# Second terminal
rosrun rviz rviz __name:=rviz

# First terminal again
[ WARN] [1529837879.313228883]: Shutdown request received.
[ WARN] [1529837879.313324710]: Reason given for shutdown: [new node registered with same name]

The only exceptions are nodes which are defined in the roscore.xml as explained here. My question is, can I change the behavior of rosrun/launch such that old nodes keep running and new nodes will be killed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-06-24 06:20:23 -0600

gvdhoorn gravatar image

No, that is not currently possible.

Can you perhaps explain why you are looking to change this?

edit flag offensive delete link more

Comments

I just thought of it as a handy functionality. I have collections of multiple launch files for main apps and debug. It may happen when I start my various debug launch files that I have nodes with same names. Of course, I can use anon tag, but then I run multiple nodes which is annoying.

tik0 gravatar image tik0  ( 2018-06-24 06:53:34 -0600 )edit

Question Tools

Stats

Asked: 2018-06-24 06:17:15 -0600

Seen: 1,110 times

Last updated: Jun 24 '18