Ask Your Question
0

Allowing only certain arguments in launchfile

asked 2020-05-25 17:48:01 -0500

jojo gravatar image

Is it possible to make roslaunch throw an exception (or set a flag, or just anything except being completely silent) when an unexpected argument is given on the command line? Expected arguments could mean the ones I declared with <arg name="expected_arg_example" /> or they could be in a list or something like that. I find it problematic if a user doesn't get notified in any way if he e.g. mistypes or runs into version confusions or something like that. Best regards, Johannes

edit retag flag offensive close merge delete

Comments

Related question: #q352906.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-26 01:58:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-26 01:57:58 -0500

gvdhoorn gravatar image

No, this is not supported in ROS 1 (or at least, not in the default roslaunch, there could be community contributed extensions which may add this, but I'm not aware of them).

I find it problematic if a user doesn't get notified in any way if he e.g. mistypes or runs into version confusions or something like that.

Yes, that could be problematic.

Current best-practice in ROS 1 would suggest to make sure nodes implement parameter verification and to make them very vocal about things not being as they should.

And don't set defaults on args, nor use default values in nodes if at all possible (to prevent "silent" misconfiguration).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-25 17:48:01 -0500

Seen: 11 times

Last updated: May 26