Macro for nodes in launch file
I'm trying to use the PID package to control the joints of a snake robot. Since each node will be single controller, I need to start several nodes to control all the joints. The pid nodes have several parameters, so I hope to be able to write some form of macro that can make my launch file more compact and manageable. I found out that launch files are written in XML and not Xacro, so I can't use macros like you can for the URDF files. Does anyone know a clever way to do this?
This is incorrect.
xacro
should be able to generate any xml format, andxacro
is also inxml
format.Specifically for
include
-ing a .launch file so this isn't exactly fornode
, but #q229489 is a good option that doesn't require customization (i.e. needed functionality is in the library).