Using the dictionary syntax: http://wiki.ros.org/ROS/YAMLCommandLine#Command-line_and_messages_.28dictionaries.29
We avoid the problem of requiring double quotes inside of the args field. (I found no way to realiably escape the quotes, for double quote I used "
and for single quote I used '
but I still was getting errors).
<launch>
<!-- Publishing a dummy empty pointcloud (but with x y z fields described to avoid
errors like: Failed to find match for field 'x'. ) -->
<node name="dummy_pointcloud_pub" pkg="rostopic" type="rostopic"
args="pub -s /dummy_pointcloud sensor_msgs/PointCloud2 '{header:
{stamp: now, frame_id: base_link},
height: 0,
width: 0,
fields: [{name: 'x', offset: 0, datatype: 7, count: 1},
{name: 'y', offset: 4, datatype: 7, count: 1},
{name: 'z', offset: 8, datatype: 7, count: 1}],
is_bigendian: false,
point_step: 0,
row_step: 0,
data: '',
is_dense: false}' -r 15" />
</launch>