Our team has decided that we will be using a second computer on our robot because we are unable to run complicated drive code and vision processing at the same time. When we do this our code does not always deploy, freezes up, and has bad performance, and we have only just started working on drive. I have looked into using a second FRC cRIO (old version). We would see that 2 cRIO’s are legal for the robot but we are wondering what the applicable cost of the cRIO is. We also are going to power the cRIO with a DC-DC voltage converter from 12 to 24 volts. We also try to communicate between the two of them using UDP. Is there anything we should be aware of if we attempt this? Do you know of any other teams who have done this?
The FRC discount price for a cRIO FRCII chassis is $285.
Make sure to set them as different team numbers (so they have different IPs), stay away from UDP ports 1100-1200, and make sure to either put your code in Disabled or forgo the FRC framework entirely (preferred).
We are aware of the price of the new cRIO but we were wondering if the price for the old one was different and if we can use the discounted price. We also would like to know if anybody knows if there is a tutorial/example code for sending info via UDP between the cRIO and something else. We are able to send UDP out of a cRIO and receive it on a computer but are unable to get it to continuously send or receive from a cRIO. If anybody has any experience doing this some help would be appreciated.
You’d do it the same way - the cRIO is just a little computer. You’d just have them both listening on UDP port x for data sent by the other. I can post some examples in LabVIEW, if you’d like.
If you could show me some lab view examples for how to set up something for listening that would be very helpful. I know how to do this in java, but my attempts in lab view have not been very sucsessful.
I think you can use the discounted price. In the blue box under [R14] it says “Example: Special price discounts from National Instruments and Texas Instruments are being offered to all FIRST teams. The discounted purchase price of items from these sources would be used in the additional parts accounting calculations.”
However, I don’t think you can use the discounted price of an FRC-CRIO II when you are using the FRC-CRIO. The discounted price of the FRC-CRIO was $750 (with modules, I’m not sure it was available without modules). Unfortunately, this exceeds the $400 per item limit [R14].
I think the only legal way to use a cRIO as a co-processor is to use an FRC-CRIO II
It is really easy to bloat vision code. Before you go through the complexity of adding a second cRIO, I would take a good hard look at your vision code and make sure you can’t fix it first.
A common mistake is to put vision and drive in the same loop, which slows the drive code to the same rate as the vision code. They belong in parallel loops, which forces the portion of your drive algorithm that is dependent on vision inputs to accept that they will run at different rates. If you split vision off to a separate cRIO but you do not solve that fundamental issue, you will not see any benefit from the exercise.
Oops! Some kids had tried to make a latching button but had using while loops instead of case structures. They had about 20 while loops that they forgot to delete and about 5 while loops inside of each other, all trying to do very strange boolean operations. Once we removed that, our vision code + drive was only 70% CPU usage…I guess there is no good reason to have 2 cRIO’s!