Currently we are working with a raspberry pi and python using opencv for our vision code. We first tried testing our code while ethernet was already plugged in and in the GUI of the raspberry pi and we were able to output turning angles to the smart dashboard of our robot. We then moved to setting up an autorun method so when we turn the pi/robot on it automatically starts up the process. After a couple of errors we could get it to run properly, but this was without ethernet connected to the robot. The problem arises when we are running our autorun vision code and connected via ethernet to the robot. While booting the code, we see the cameras turn on for a brief moment and then turn off when the code starts running. The code stalls and says “select timeout”, and then starts running properly but prints out that there is no such device and we can observe that the cameras LEDs are off. We know the device IDs are correct. How can we resolve this issue?
So we’re clear - you want the pi to run your program whenever the pi boots up, correct? If so, we’ve done this by using crontab, to access it type crontab -u pi -e into the terminal (after youve done this once just type crontab -e) then where it says to put your command write @rebootcommand
I may have interpreted your question wrong and your issue may only be with the raspberry pi not recognizing the usb cameras plugged into it? If so…currently in our code when we create the camera we just give one camera device id 0 and the other 1 and the pi just looks for a camera on its usb ports, finds one, and moves on to the next.