Ask Your Question
1

<arg> tag in launch-files

asked 2011-09-14 03:43:55 -0500

Filip gravatar image

updated 2011-09-14 05:40:16 -0500

kwc gravatar image

Hi,

the wiki-pages aren't that precise. Is it right, that the arg tag can be used within an include tag and within a launch tag, but not within anything else? So it can't exist in a group-tag?

Kind regards, Filip

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2011-09-15 04:09:22 -0500

kwc gravatar image

You can use the <arg> tag inside of <launch>, <group>, and <include>. I have updated the wiki docs.

edit flag offensive delete link more
1

answered 2011-09-14 05:22:31 -0500

joq gravatar image

The <arg> XML tag syntax is sometimes confusing. Note that it can be either a declaration or an assignment.

  • To declare an <arg>, put it almost anywhere in the file before using the $(arg) substitution variable.

  • To assign a value, nest it within the <include> tag, or pass it to the top launch file via a parameter to roslaunch.

edit flag offensive delete link more

Comments

What means almost anywhere?
Filip gravatar image Filip  ( 2011-09-14 07:12:33 -0500 )edit
Not sure, hence the vague answer. It can certainly go within the scope of the `<launch>` tag.
joq gravatar image joq  ( 2011-09-14 13:31:23 -0500 )edit
And <group> is like <launch>. ;)
Filip gravatar image Filip  ( 2011-09-14 21:24:25 -0500 )edit
0

answered 2011-09-14 04:33:20 -0500

dornhege gravatar image

I'm not sure if <arg> could be used in a group and what the purpose would be, but you can certainly use an arg in a group tag like:

<group unless="$(arg disable_vertical_laser)" >

Is that what you want to do?

edit flag offensive delete link more

Comments

no, I didn't mean the substitution stuff.
Filip gravatar image Filip  ( 2011-09-14 07:13:54 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-09-14 03:43:55 -0500

Seen: 375 times

Last updated: Sep 15 '11