Is it possible to remap a parameter name in a launchfile ?

asked 2023-07-04 11:14:10 -0600

SébastienL gravatar image


My launch file include another one that uses a parameter named "dname", it also starts a Node which uses a parameter named "basename". Those 2 parameters are in fact the same one.

Is there a way to indicate that "basename" should use "dname" ?

I have declared "dname" with

arg_dname = DeclareLaunchArgument(
    description="basename of the drones."

I tried those elements in Node instanciation

remappings=[("dname", "basename")], # doesn't work.
parameters=[{"basename": arg_dname }],  # value expected, not the declaration

If I have understood correctly, arg_dname has no value until a context is loaded. Is an OpaqueFunction the only solution ?

edit retag flag offensive close merge delete