Preventing spawn of two nodes with same parameter

asked 2015-06-29 10:55:12 -0600

thailor3 gravatar image

updated 2015-06-29 11:00:02 -0600

I have a launch file that takes a serial number and a index number and launches the node based on those numbers, however if I launch one node with a serial number, and then a second node with the same serial number, then the second node will cause the first to shutdown because of "ros node with same name" and then since I have my respawn set to true (for other reasons) then the first node respawns and shutsdown node 2, and etc etc.

Any ideas how i can check for the serial number already being used? assuming the user is completely ignorant to any node already launched. I wanted to ideally check in the launch file, but I can only do boolean expressions with the "if" or "unless" statements, and for what I am trying, it doesnt work. PLEASE HELP!XD Thanks

perhaps there is an xarco type statement I can write? I am just not extremely familiar with it.

edit retag flag offensive close merge delete


Same problem. have to bring in two nodes. Did you sort it out?

Usman Arif gravatar image Usman Arif  ( 2015-09-16 23:43:48 -0600 )edit