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

changing roslaunch parameter

asked 2013-04-05 02:50:13 -0500

ZoltanS gravatar image

updated 2013-05-15 04:44:54 -0500

Hi! I would like to use an external webcam with a laptop that already has a built-in webcam which is mapped to /dev/video0. The uvc_camera node wants to use /dev/video0 and would like to change it to /dev/video1 is there any way to change the parameter from command line? I know I could change the .launch file, but I don't want to touch it. I tried to run roslaunch as follows, but it didn't work:

roslaunch uvc_camera camera_node.launch device:=/dev/video1

What is the best way to change a parameter in roslaunch without editing the original roslaunch file?

Update 1:

In the meantime I just found out, that if I copy the original launch file to somewhere in my home directory, I can edit it and I can launch it from there as well. This was probably too obvious, but I was confused by having the package name after the roslaunch command. For example:

cp /opt/ros/groovy/stacks/camera_umd/uvc_camera/launch/camera_node.launch /home/user/ros_workspace/
roslaunch /home/user/ros_workspace/camera_node.launch
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-05 03:14:54 -0500

joq gravatar image

As you said, no parameters are defined for that launch script. It is possible to add them.

  • Simple solution: make a copy of the script in a package of your own (e.g. my_camera_params), and edit to taste.

  • Complete solution: open an enhancement ticket, fork that UMD git repository, add <arg> tags for all the parameters, submit a pull request to Ken Tossell.

edit flag offensive delete link more

Comments

You can also modify the (private) parameter value after the launch file has run, from the calling/external code. This technique will not help in this case, though, since the uvc_camera node only reads the parameter value at initial start-up.

Jeremy Zoss gravatar image Jeremy Zoss  ( 2013-04-05 11:54:42 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-05 02:50:13 -0500

Seen: 1,931 times

Last updated: May 15 '13