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

How to use multiple RGB cameras with ROS?

asked 2014-09-18 07:26:26 -0500

diegomex gravatar image

Hi dear ROS community!

I would like to learn how to use multiple RGB cameras with ROS in a single PC. I already know how to use a single camera with the gscam package, I can read the video stream in the /camera/image_raw topic.

However, I couldn't find any information about the use of multiple cameras with ROS (let's say 3). I would like to create a node for each camera ( e.g. /camera01/image_raw, /camera02/image_raw, etc.) and then process them separatedly. I don't know if this is possible using gscam.

In general, what is the proper way (good practice) to use multiple RGB cameras with ROS?

Thank you very much!

edit retag flag offensive close merge delete


I don't know about RGB, but for RGBD it is possible to use multiple Kinects. Look into the openni_launch-package. There you can give each camera it's own namespace, like you proposed in your question

Rabe gravatar image Rabe  ( 2014-09-18 09:21:59 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-09-18 14:58:43 -0500

paulbovbel gravatar image

updated 2014-09-19 13:32:25 -0500

Generally, running multiple copies of the same system is easy enough, since each node has it's own private namespace.

However, having used gscam, this might be tricky because it's very un-ROS in the way it reads the device name from an environment variable.

If you use usb_cam, you should be able to specify the input device for each node with the video_device parameter.

edit flag offensive delete link more

answered 2014-09-18 19:03:19 -0500

I found gscam to be a pain with more than one camera. Best to go with one of the other webcam packages, and you can setup some udev rules to tie your devices to specific /dev addresses. I've used uvc_camera as well as usb_cam.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-09-18 07:26:26 -0500

Seen: 2,091 times

Last updated: Sep 19 '14