If statement in launch file
I want to cancel the creation of a node in the launch file if a value, which is entered by user in console, equals a certain value. For instance
I am launching a file: roslaunch file attr1:='1' attr2:='2'
and in my launch file i want to do a check. the syntax in any other language would be :
if (attr1 == value){ cancel node};
problem is, in the launch file I tried to use a unless="$(arg attr1)" but it's not a bool because when i enter the value in the console, it is an int. So i realized the unless and if conditionals in the launch file are explicitly looking for a true or false, and that they can't do a comparison:
unless="$(arg attr1 == '1')"
did not work. any suggestions? Any syntax I can use launch file that would make this work?
THANKS!
This question has already been asked at http://answers.ros.org/question/12756... BUT I'm wondering if (and very hopeful that) things have changed in Jade. See my comment on the accepted answer.