-
Notifications
You must be signed in to change notification settings - Fork 0
Using a USB Camera
Nicholas Paul edited this page Nov 27, 2017
·
1 revision
Start with no USB cameras plugged in and run the following command. You may see a camera listed here if your computer has a webcam.
ls /dev/v4l/by-id
Plug in your USB camera, wait a few moments, and run the same command again. You should see an additional camera listed here. This is your camera's path.
Refer to this line in launch/camera.launch
which reads:
<param name="~source" type="string" value="/dev/video0" />
The parameter value
is the path of the camera. Change it so that it reads
<param name="~source" type="string" value="/dev/v4l/by-id/<YOUR USB CAM PATH>" />
For example, yours may now look like
<param name="~source" type="string" value="/dev/v4l/by-id/usb-KYE_Systems_Corp._USB_Camera_200901010001-video-index0" />
That's it! cam_pub
will now read from your USB camera.