-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using multiple cameras efficiently #60
Comments
Why don't you try In addition, I'm sure it is possible to specify device number corresponding to the serial number using udev settings. |
@7675t thanks a lot for your feedback. I just came back to working on this! I was just testing it a bit. Here is my launch file:
What I noticed is that if I don't add the serial parameter the node starts just fine. When I specify the serial as "/dev/video2", where my camera is the node dies with the error:
I tested the uvc_node with /dev/video2 and it worked just fine. When running rqt_dynamic_reconfigure and selecting "elp_camera" the rqt_reconfigure dies with an error:
I'll see if I can find a source of the error. If I make any discoveries I'm happy to update the docs! |
'/dev/video2' is the name of the device file, not a serial number. You can check the serial number with lsusb command (iSerialNumber). Some USB device doesn't have it, so please check it. |
@7675t I see, thanks for clarifying that! Unfortunately all the cameras that I have report the same serial number. It seems to me that the only way forward is using a library that works directly with device files. Thanks for all the help! |
@7675t a final question - maybe you will know the answer! What exactly is the index parameter? and where is it coming from? I noticed that when I specify indices of 4 of my cameras to 0, 1, 2 and 3 I always access the same camera when launching all 4 of them. I tried plugging the cameras in random order to the same USB ports and as long as I plug them to the same port the configuration seems consistent. If the index is by any chance tied to the serial device index in the system this would most probably solve all my problems! Happy to update the docs to make this param function clearer if my suspicion is right! |
Wiki says the index is the order number of devices which have same vid and pid. Code is here. I'm not sure the order is always same, sorry. But in my experience, if we plug the devices into same USB port at boot time, they are assigned to same bus and same port and assigned same device number in same order, so you may be able to use index. And as I mentioned before, you may be able to use udev.rules to fix the device name corresponding to the port number etc. (Please search the way in the web). There is even a bit tricky way to use external program in udev.rules to identify the devices. Good luck. |
@msadowski have u got a workaround for this issue, im also facing the same problem connecting 2 identical camera |
Unfortunately not really. As far as I remember I kept them as they were and
they were always showing up in the same order.
…On Mon 11. 1. 2021 at 0:11, ridhwankamil ***@***.***> wrote:
@msadowski <https://github.com/msadowski> have u got a workaround for
this issue, im also facing the same problem connecting 2 identical camera
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR5TFWT27DK7YRXU6ESC4LSZIXZBANCNFSM4HGG22AA>
.
|
In my case, usb camera devices which I always plug in ports in same order, are assigned to different indexes by libuvc each time I reboot robot's computer so this creates a mess in my workspace. I couldn't find other way than working with usb_cam package. |
Hi!
I've been trying to figure out this one for quite a while now. I have 3 cameras (same manufacturer and model), when checking the settings the 3 parameters of vendor, product and serial are the same. The only way I can launch different cameras is by modifying the index parameter.
Is there any way I can have a control of the camera index? Ideally I would like to prefix my camera names according to the robot placement (forward, left, right). If the driver used the device path (/dev/video0 etc) then I would create a symlink based on the USB port the device is connected to.
Any tips how could I solve this particular problem? I know uvc_camera node can take a device path but I would prefer to stick with libuvc_ros if possible.
The text was updated successfully, but these errors were encountered: