Xacro:macro passing argument as string with whitespaces

asked 2020-10-22 05:16:58 -0600

definitive gravatar image

How to pass an argument as a string with whitespaces in xacro:macro? When I'm passing argument from launch file

<arg name="xyz" default="10"/>

with defined macro in xacro file:

<xacro:macro name="foo" params="xyz"/>

everything works properly, but if I change to:

<arg name="xyz" default="0 10 100"/>

I'm getting an error:

xacro: error: expected exactly one input file as argument

How to pass argument with whitespaces? I just need string argument with whitespaces and avoid using multiple params, like param_x, param_y, param_z.

edit retag flag offensive close merge delete

Comments

Hi @definitive, why not use the xacro:insert_block functionality?

Weasfas gravatar image Weasfas  ( 2020-10-23 04:37:13 -0600 )edit