While it is technically possible to have four cameras on the robot, I’m not sure it is the best or simplest approach. I’ll give you some technical input on doing four cameras, but I’m also going to ask some questions and make some suggestions.
If you want four cameras on the robot, you will need a hub, either USB or enet. These days it will probably be an enet switch instead of a hub, but for your purposes they are the same anyway. These will require power by the way, and you want that power to be protected so they don’t drop out. You will also need to identify the four devices by address, and this will vary depending on their type and the libraries being used. For LabVIEW and USB, it should be as simple as using “USB 0”, “USB 1”, etc. I don’t think the other languages make the lookup for you, so instead it will be “cam0” or something similar, but those jump around more in my experience.
For enet cameras, they will have unique IP addresses, either statically assigned or dynamically assigned.
The important thing is to keep the left/right/front/back associations correct over reboots or easily configurable or interpretable by the drivers.
The next consideration is that it will be rather difficult to stream all four cameras back to the dashboard at once. You can do this if you drop the resolution and frame rate, but you’ll end up with 1/4 the quality on four images. The other way of doing this is to only display and transmit one camera at a time and have a switch button for the drivers.
The WPILib and sample programs aren’t generally doing more than one camera at a time, so that also means that the beta teams and developers aren’t testing multiple cameras as well as a single camera. You will definitely need to modify the template code and may need to modify the libraries to get this to work the way you want.
As for my questions:
What are the four cameras for? Are they for humans to look at, kinda like a security guard station? Can the drivers really use this? Will they really use it?
Are the cameras to measure things? You may want to consider other sensors that can potentially make the measurement and potentially make it better. Remember – computer vision != human vision.
Also consider whether someone can help who has done this before. Four cameras may turn out to be four times harder than one. Are there better things to spend time on to improve the robot and learn cool stuff?
Greg McKaskle