How does one pass xacro blocks as arguments in a launch file?

asked 2018-08-07 06:29:32 -0500

sherlockshome221 gravatar image

The insert_block feature in xacro is super nice. However, I am not quite sure how to pass such a block argument from a launch file. Most of the answers I have seen so far are about passing single arguments from a launch file. Here is what I am trying to do:

<xacro:macro name="foo" params="*foo_block">
   <link name = "foo_link">
     <xacro:insert_block name=foo_block />
   </link>
</xacro:macro>

And in the launch file, I would like to load the xacro to a parameter like this:

<param name="my_param" command="$(find xacro)/xacro --inorder '$(find my_package)/urdf/foo.xacro' foo_block:=??"/>

Any help on how to do this is very much appreciated. Thanks!

edit retag flag offensive close merge delete

Comments

I'm not sure this is actually possible.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-07 10:48:15 -0500 )edit