How to add two usb 2.0 cameras with libuvc_camera driver?

asked 2019-02-14 15:55:08 -0500

BRIGHT BULB gravatar image

Hi! I am a student who is conducting a research. I am really appreciate your work on ROS development. But now I encountered some problems with making use of usb cameras on ROS. Below is the information about my question.

Names and versions of stacks: I am using ROS kinetic with libuvc_camera

Platform: Ubuntu16.04

Problem: I want to use two generic usb 2.0 cameras with libuvc_camera package. Currently, I just can use one camera and show video stream in display type of image (not display type of camera) in Rviz. My question is how to use two usb 2.0 cameras in ROS and show them in display type of camera. I am not sure whether I need to change code from driver or launch file. If it is necessary to change the code, could you give me some suggestion, please? I might leave out some important details that you want to know from me. Please let me know if you need any information from me. Thank you so much.

edit retag flag offensive close merge delete

Comments

if you connect both cams to your system, you will see 2 video devices (/dev/video0 and /dev/video1). You need to setup uvc node for each device.

ChriMo gravatar image ChriMo  ( 2019-02-15 01:55:01 -0500 )edit

Thank you for your response since this problem has bothered me for a long time. Are you mean that all I need to do is just to change launch file under libuvc_camera package after I connect two cameras to my system?

BRIGHT BULB gravatar image BRIGHT BULB  ( 2019-02-17 22:29:32 -0500 )edit

yes, you need to start 2 nodes with different video settings...

ChriMo gravatar image ChriMo  ( 2019-02-18 03:17:58 -0500 )edit

I don't know why I didn't find the file with an extension of .launch. Could you tell me where the launch file I need to change is? I will appreciate it a lot if you can help me look at this problem.

BRIGHT BULB gravatar image BRIGHT BULB  ( 2019-02-21 00:09:19 -0500 )edit