How to use resource_retriever urls in command line yaml in launch script
I am trying to display a mesh file in rviz by publishing a latched Marker message with "rostopic pub". This works, however, when I move this into a launch script, i get errors regarding the resource_retriever url. the launch script line:
<node name="$(anon robot_mesh_pub)" pkg="rostopic" type="rostopic" args="pub -l /robot_mesh visualization_msgs/Marker '{header: {frame_id: '/robot'}, type: 10, pose: {position: {x: 0, y: 0, z: 0.2}, orientation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5}}, scale: {x: 0.001, y: 0.001, z: 0.001}, color: {r: 1.0, g: 1.0, b: 1.0, a: 1.0}, frame_locked: true, mesh_resource: package://meshes/robot.stl}'" output="screen"/>
I have tried to quote, and escape quote the "package://meshes/robot.stl" string in many different ways with no success. I think the problem is that the resource_retriever protocol "package:" looks just like the yaml dictionary key. (a string followed by a colon). and the roslaunch parser won't let me escape the quotes properly.
3 ideas:
use the list format for command line yaml instead of dictionaries. (painful)
the resource_retriever should have a feature to also accept "regular" file paths that start with a slash.
this is possibly a bug in the roslaunch parser because it doesn't seem to handle escaped quotes properly.