|
Re: Multiple cameras on one Robot
Ok, I took a shot at turning the RoboRIO into a video router. The code is in the standard Vision Processing vi location.
A few things of note
1) I'm pretty sure I used my team number when I created the project (You'll have to correct)
2) This is *NOT* tested yet, so I expect some errors.
3) Create a dashboard string control called "Camera" and write "Camera A", "Camera B", or "Camera C" to it. This should let you choose which camera to use.
4) I had to modify two WPI files for this. I have renamed them and placed them in the project. The use of these renamed files should not cause any issue.
5) This only works with Axis cameras right now.
Everything else should be as per usual configuration.
How it works:
All cameras are opened per normal. The big change is "Camera IP & Dash" was modified and renamed (renamed to prevent interference) to only read the camera and not send the code to the dashboard (send 2 pc). The Send 2 PC code was reduced to what is shown in the loop. It selects the JPG image desired and forwards it to the dashboard.
Theoretically this should keep all cameras open simultaneously and forward the different camera image at the next frame without having to restart the network connection. Additionally, since this is all performed on the robot you are only sending one cameras worth of data across the network to the dashboard.
If this doesn't work, let me know. I'll have access to Axis cameras over the next few days. I'm planning on adapting this for the USB cameras from Microsoft which can also provide a JPG without needing the RoboRIO to provide compression. Theoretically I should be able to have this setup to work on a mixed Axis & USB environment.
__________________
Quote:
Originally Posted by texarkana
I would not want the task of devising a system that 50,000 very smart people try to outwit.
|
|