ros2 launch arg bug with string?
In the example launch file below:
<launch>
<arg name = "foo" default = "a:"/>
<node pkg = "demo_nodes_py" exec = "listener" output = "screen">
<param name = "foo" type = "str" value = "$(var foo)" />
</node>
</launch>
I get the following error which I don't get if there is not the trailing ":". The error message should also be more informative, maybe provide the arg name and value.
aravind@carrot:ros2_examples$ ros2 launch test.launch.xml
[INFO] [launch]: All log files can be found below /home/aravind/.ros/log/2020-08-07-15-11-27-621475-carrot-25030
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Allowed value types are bytes, bool, int, float, str, Sequence[bool], Sequence[int], Sequence[float], Sequence[str]. Got <class 'dict'>.
When I replace it with an integer, I get the following error when I have a C++ node that tries to access the "foo" parameter as a string.
[talker-1] terminate called after throwing an instance of 'rclcpp::ParameterTypeException'
[talker-1] what(): expected [string] got [integer]
There seems to be implicit conversion here. How can I pass arbitrary strings without conversion?
Thanks!