AIRLegend / aitrack

6DoF Head tracking software
MIT License
1.03k stars 102 forks source link

Works with only first PS3 Eyecam when multiple eyecams are connected #175

Open searching46dof opened 1 year ago

searching46dof commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Works with only first PS3 Eyecam when multiple eyecams are connected via usb.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error Connect more than one PS3 Eyecam. They will be enumerated as camera0, camera1,... "Start tracking" will work with PS3 Eyecam as camera0. If you attempt to "start tracking" others, the preview window will be black with some lines across the top

Expected behavior A clear and concise description of what you expected to happen. Multiple cameras (PS3 eye and non-PS3 ) are enumerated. Should be able to run more than one instance each tracking from separate cameras.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here. CameraFactory::getCameras only attempts to initialize one instance of Ps3Camera and then attempts to initialize 4 instances of OCVCamera

searching46dof commented 1 year ago

The camera enumeration on the same computer also appears to be inconsistent.

If there are 2 cameras on a computer, cameraA and cameraB: One instance of aitrack may enumerate them as camera0=cameraB and camera1=cameraA while a second instance (from a copy in a separate folder) enumerates it as only camera0=cameraA

On a different computer the same cameras are enumerated as: One instance of aitrack may enumerate them as camera0=cameraB and camera1=cameraA while a second instance (from a copy in a separate folder) enumerates it as camera0=cameraA and camera1=cameraB