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

How to launch stereo view from inside a launch file

asked 2014-11-27 22:08:26 -0500

Juan gravatar image

I am having trouble with thinking how to do two arguments inside the args type of a node element in the launch file.

Consider wanting to launch the following node inside a launch file: rosrun image_view stereo_view stereo:=/my_stereo_cam image:=image_rect_color

We would have something like this:

<launch>

 <arg name="stereo" default="multisense_sl/camera"/>
 <arg name="image_view" default="image_rect_color"/>

  <node name="stereo_cam" pkg="image_view" type="stereo_view" args="stereo:=$(arg stereo) image:=$(arg image_view)" >
 </node>
</launch>

I have tried different combinations of arguments formats, quotes, and just can't get it to work. I would appreciate any advice. Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-30 00:21:30 -0500

malvarado gravatar image

updated 2014-12-02 00:38:21 -0500

You should use the roslaunch remap tag http://wiki.ros.org/roslaunch/XML/remap

Your launch file should look like this

<launch>

 <arg name="stereo" default="multisense_sl/camera"/>
 <arg name="image_view" default="image_rect_color"/>

 <node name="stereo_cam" pkg="image_view" type="stereo_view" >
     <remap from="stereo" to=$(stereo) />
     <remap from="image" to=$(image_view) />
 </node>
</launch>
edit flag offensive delete link more

Comments

This doesn't work, because it appears to be malformed launch file markup. The console error I get is:

Invalid roslaunch XML syntax: not well-formed (invalid token):
Cataphract gravatar image Cataphract  ( 2017-09-17 13:20:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-27 22:08:26 -0500

Seen: 1,769 times

Last updated: Dec 02 '14