Python argparse with --help flag
As explained by zmk5 in ROS Discourse, we can argparse to launch files. However with the --help
flag
ros2 launch file.launch.py --help
the thread gets stuck. Could one solve this?
What do you mean by the thread getting stuck? Does it output an error?
steps to reproduce. Take this launch file
move it to
demo_nodes_cpp
execute it
The expected behavior is that
--help
calls exit, which in this case is somehow locked, and one has toctrl+c
the way outI believe you need to add a
description="some argument description"
argument to yourargparse.ArgumentParser()
.Something like this:
parser = argparse.ArgumentParser(description="some description")
no thats unrelated. The error reads stuff like