ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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: "/world"}, 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: "package://pr2_description/meshes/torso_v0/torso.stl"}'"
output="screen"/>
</launch>
2 | No.2 Revision |
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: "/world"}, 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: "package://pr2_description/meshes/torso_v0/torso.stl"}'"
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.
3 | No.3 Revision |
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: "/world"}, 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: "package://pr2_description/meshes/torso_v0/torso.stl"}'"
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.