I'd like to define an argument in ROS2 launch file which is a list of tuples. How should the list in default_value
be formatted?
def generate_launch_description():
argument = LaunchConfiguration('argument', default_value=[(1, 0, 0), (0, 1, 0), (0, 0, 1)])
node = Node(package='...', executable='...', parameters=[{'argument': argument}])
return node, argument
Currently, I'm getting the following errors based on different formatting:
argument.default_value = [(1, 0, 0), (0, 1, 0), (0, 0, 1)]
>>> Failed to normalize given item of type '<class 'tuple'>', when only 'str' or 'launch.Substitution' were expected.
argument.default_value = ['(1, 0, 0)', '(0, 1, 0)', '(0, 0, 1)']
>>> In the node argument.value[0] is '(' whereas it should be (1, 0, 0).