Quote:
Originally Posted by lobrien
I am brand new to FRC this year and am trying to help with the programming aspect. Since I literally walked in to volunteer last Tuesday and the first competition is in just a few weeks, time is of the essence...
As I understand it, C++, Java, and LabView are "supported" languages and I took this to mean that other languages were not *allowed*. But it seems to me that there is (at least) some kind of Python-based community and I saw some threads about people using IKVM to allow C# components, etc.
Can someone clarify what is *allowed*? Specifically, I work for Xamarin (mono sponsors) and am most productive in CLR-based languages such as F# and C#. Are we allowed to develop a mono-based solution? Or, if Java is allowed, can we use Scala or another language that runs on the JVM?
I'm sorry if this is covered in a FAQ somewhere, but my Google-fu hasn't proved sufficient to get me an answer. (P.S. Any link to a software development rules/restriction FAQ would be highly appreciated!)
|
There are no rules in FRC stating that only the officially supported languages can be used. The rules for the robots can be found
here, and the only restriction is that the RoboRIO must use the official image, which only includes the FPGA code, which any language can build on top of. There exists both a
Python port and a
DotNet port of the FIRST provided libraries to support these platforms on the RoboRIO.
The big gotcha with the unsupported languages is that they are unsupported. If you run into an issue at competition, field staff may not know how to help you. However, both ports are almost direct ports from the official libraries, and their creators use them in competition, so any issues will most likely be fixed early. In addition, if issues are found, we don't have to wait for FIRST and WPI to fix them, and can fix them on a much quicker timeline.
Getting Mono to run on the RoboRIO was actually fairly easy. NI's tools had a way to cross compile it without any issues. After that, it was just getting the libraries ported and the HAL interface working, which actually wasn't too difficult. This summer, we are actually going to try and port .NETCore to the RIO, and potentially get rid of all mono requirements, although we likely would still keep them as a backup.
As for Java, if it runs on the JVM and can access Java libraries, you should be able to get it to run on the RoboRIO. Same with the DotNet port. As long as you can access a DotNet library, you can use any language that will build on top of the CLR. VB has been minimally tested but does work, and F# should work too without much hastle. The only issue with F# is that the WPILibs are not written with functional programming in mind, and would probably be difficult to work with.
If you have any questions, please feel free to PM me and I can try and answer them the best I can.