[ros-users] Parameter resolution order in launch files
Ken Conley
kwc at willowgarage.com
Tue Dec 28 06:58:06 UTC 2010
On Mon, Dec 27, 2010 at 10:43 PM, Patrick Bouffard
<bouffard at eecs.berkeley.edu> wrote:
> Hi Ken,
>
> On Mon, Dec 27, 2010 at 10:23 PM, Ken Conley <kwc at willowgarage.com> wrote:
>> Good recommendation. I added a paragraph here. Please let me know
>> what you think:
>>
>> http://www.ros.org/wiki/roslaunch/XML#Evaluation_order
>
> Thanks, that looks good. One question: that paragraph seems to be
> written to apply to the whole launch file, not just parameters. But
> are there any other elements that can be defined more than once
> without throwing an error? E.g. if you define a machine or node twice,
> roslaunch yells at you doesn't it? Are you saying that the same rule
> applies to <arg> tags too?
It doesn't apply to arg tag. It does apply to other tags that
establish a 'key', e.g. remap, machine, env. Of course, this reminds
me that my unit tests probably need to test this more strenuously.
> Also I'm not sure I understand what you mean by 'brittle' override
> behaviour. Of course if you don't have the right parameter name the
> override won't work--how would args make this any better? And wouldn't
> you have to have an <arg> for every single parameter you ever want to
> change? Do you just mean that if you provide an arg setting that isn't
> used, that roslaunch will complain (IIRC)?
roslaunch will complain about arg settings that do not line up. And
you're right, attempting to arg-specify every parameter would get very
cumbersome, though you could use <arg> to specify the name of a
parameter file instead -- obviously this does not provide smooth
transition between fine and coarse overrides.
One of the things that is 'medium' priority for me is brainstorming a
better roslaunch specification format, now that we have better
understanding of how roslaunch is used. In particular, now that nodes
have names, I've been trying to brainstorm as to how to have something
similar to XPath which would allow addressing/overriding of any
node-based configuration (remaps, args, etc...). Suggestions are
welcome.
> Are the ways that roslaunch will complain such as those I mentioned,
> and (maybe more importantly) the cases where it won't complain,
> documented somewhere?
<arg> is one of the few things that roslaunch will complain about --
one of the reasons why I added was to provide a mechanism to make
roslaunch to complain :).
The arg page documents the "must/cannots" of various <arg> usages:
http://www.ros.org/wiki/roslaunch/XML/arg
- Ken
More information about the ros-users
mailing list