bponsler / urg_node

ROS wrapper for the Hokuyo urg_c library.
0 stars 8 forks source link

Launch file arguments are not parsed #9

Open aarushg22 opened 6 years ago

aarushg22 commented 6 years ago

The arguments which are passed in the launch call are not parsed properly. Basically the code expect the launch utility to return a dictionary in argv as we can see in this line

args.extend(["--serial-port", argv[name]])

but the right now the launch utility returns a list of options split by using space as a delimiter as we can see in the code here https://github.com/ros2/launch/blob/master/launch/launch/main.py. There is a function called get_launch_args in this file https://github.com/ros2/launch/blob/master/launch/launch/arguments.py which returns a dictionary of parsed arguments, but I could not find it being used anywhere as the argv is passed directly as a list back to the launch file in this line.

I tried replacing the args.args in this line with a get_launch_args(args.args) and the arguments are parsed perfectly as the launch utility returns a dictionary.

So I'm not sure if this is a issue with launch utility or are we supposed to receive a list and not a dictionary and parse it in the python launch file itself.

@bponsler can you clarify where the issue lies, the launch utility or the python launch file here?

bponsler commented 6 years ago

Thanks for filing the issue. From what I’ve understood the ros2 launch utility is expected to be majorly changed or go away in favor of a different method of launching nodes. This may have changed but that was my previous understanding.

If that’s still the case then I think we should assume the args come into the node launch file as a list and call get_launch_args in the jose launch file itself at the top.

Does that make sense?

aarushg22 commented 6 years ago

Yes, that seems good if launch utility is unstable, but since I can still use ros2 run, this is not an urgent issue and it would be better if I do a little research about the status of launch and then make any changes.