ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

None of the above! You're writing XML, so you need to escape quotes the XML way: """

The following worked for me:

    <launch>
      <node 
        name="$(anon robot_mesh_pub)" pkg="rostopic" type="rostopic" 
        args="pub -l /visualiztion_markers visualization_msgs/Marker '{header: {frame_id: &quot;/world&quot;}, 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: 1.0, y: 1.0, z: 1.0}, color: {r: 1.0, g: 1.0, b: 1.0, a: 1.0}, frame_locked: true, mesh_resource: &quot;package://pr2_description/meshes/torso_v0/torso.stl&quot;}'" 
        output="screen"/>
    </launch>

None of the above! You're writing XML, so you need to escape quotes the XML way: "&quot;"

The following worked for me:

    <launch>
      <node 
        name="$(anon robot_mesh_pub)" pkg="rostopic" type="rostopic" 
        args="pub -l /visualiztion_markers visualization_msgs/Marker '{header: {frame_id: &quot;/world&quot;}, 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: 1.0, y: 1.0, z: 1.0}, color: {r: 1.0, g: 1.0, b: 1.0, a: 1.0}, frame_locked: true, mesh_resource: &quot;package://pr2_description/meshes/torso_v0/torso.stl&quot;}'" 
        output="screen"/>
    </launch>

Another solution, which will only work on your local machine is to use a "$(find package_name)" roslaunch macro. Also, the resource retriever can also use "file://path/to/file" URIs.

None of the above! You're writing XML, so you need to escape quotes the XML way: "&quot;"

The following worked for me:

    <launch>
      <node 
        name="$(anon robot_mesh_pub)" pkg="rostopic" type="rostopic" 
        args="pub -l /visualiztion_markers visualization_msgs/Marker '{header: {frame_id: &quot;/world&quot;}, 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: 1.0, y: 1.0, z: 1.0}, color: {r: 1.0, g: 1.0, b: 1.0, a: 1.0}, frame_locked: true, mesh_resource: &quot;package://pr2_description/meshes/torso_v0/torso.stl&quot;}'" 
        output="screen"/>
    </launch>

Another solution, which will only work on your local machine is to use a "$(find package_name)" roslaunch macro. Also, the resource retriever can also use "file://path/to/file" URIs.