Our team is trying to mount 2 Microsoft Lifecam USB Cameras to our robot (1 in the front and one in the back). How would we be able to view both cameras? It could be either simultaneous display or alternating displays. I understand there is a 4MB limit; can we just lower the resolution/frame rate of the cameras?
Just curious - what sort of camera switching times are you all getting via code?
Our programmers told us (electrical) that it could take up to a couple of seconds and we didnāt second guess them.
Built a USB relay that toggles input to the RoboRio USB using a signal out of the DIO.
Itās still some software, but the relay switch is just about instantaneous.
Are you talking about a USB physical switch that disconnects the camera?? That canāt possibly be faster than keeping both cameras connected and using software to switch, as physically disconnecting means the camera would need to renegotiate the USB protocol etc. While the ādefaultā software behavior is to disconnect the cameras, causing a couple second delay when switching as the camera reconnects, my post linked to above as well as the second example in screensteps keeps both cameras open and connected, which results in a near-instantaneous switch.
Good question and points, because of my incomplete description.
We went on Amazon and got some off the shelf small relays that switch two USB cameras connected (via the relays) to one USB on the Roborio.
As far as the software knows, thereās only one camera connected.
We originally thought we would just switch the two USB data lines but we do the power and ground too.
Iām not convinced thereās any advantage to doing this but the programming team claimed software had a switching lagā¦this setup is an instant switch.
It would be interesting to see what ādmesgā outputs when you switch the cameras. I would expect to see it disconnect one camera and connect the new one.
Iāll see about getting info on messages when the cameras are switched via the relay moduleā¦might be a little while before I ask programmers for that , bag day is looming!
Are you talking about the Java code? Thereās no use of the MjpegServer class explicitly in that code. So Iām going to need more information (your code, what errors youāre getting) to help.
@Peter_Johnson I can see my two created cameras with name āfrontcamā and ābackcamā but donāt see anything besides that under the cameraserver tab.
Yeah, Iām positive. New to github, but ignore everything in the āmainā folder. The only files that interact with the cameras are Controls and the Robot.java outside the folder.
It looks like it wonāt appear in the camera list until it has a source assigned. Try setting an initial source for the switched stream. E.g. after the setConnectionStrategy calls, do server.setSource(frontcam);
If this works, Iāll edit my post above to correct this.