ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

pass agruments/parameters to included launch file in yaml

asked 2022-09-13 15:42:55 -0500

waspinator gravatar image

How would you pass arguments / parameters to an included launch file? The following doesn't work and gives the following error: Unexpected key(s) found in 'include': {'param'}

launch:

- include:
    file: "$(find-pkg-share test)/launch/test.launch.py"
    param:
    -
      name: "color"
      value: "red"
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-19 10:37:51 -0500

waspinator gravatar image

updated 2022-09-19 10:52:33 -0500

use "arg" instead of "param" to pass arguments into an included launch file. Names and values must all be strings in quotes.

launch:

- include:
    file: "$(find-pkg-share test)/launch/test.launch.py"
    arg:
    -
      name: "color"
      value: "red"
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-09-13 15:42:55 -0500

Seen: 47 times

Last updated: Sep 19 '22