Ask Your Question
1

Conditional <remap>

asked 2015-05-06 13:13:30 -0600

I'd like to control topic remaps using roslaunch command-line arguments (i.e. by setting ROS parameters).

Is there a way to cause a roslaunch XML topic remap to be conditional? I'm looking for behavior like the <group if="$(arg remap)"> tag.

I tried putting a <remap> into a <group>, but this only seems to remap topics for the nodes in that group.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-05-06 13:22:27 -0600

gvdhoorn gravatar image

if and unless can be used on any tag, not just group, so you should be able to achieve what you want with something like:

<remap if="$(your_condition)" .. />

See also wiki/roslaunch/XML - If and unless attributes:

All tags support if and unless attributes, which include or exclude a tag based on the evaluation of a value [..]

(emphasis mine).

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: 2015-05-06 13:13:30 -0600

Seen: 497 times

Last updated: May 06 '15