Python Tips

Hey, so the FRC Robotics team that I am a part of is kinda split on the topic of which language to program our robots in, python or C++. I personally have read many reviews stating other teams fabulous success with python but still others have their doubts. I am currently programming python as a back-up to the C++ code but I think that it should become more. Any suggestions?

While Python is easier to program, it needs to be ported to C++ in order to work on VxWorks and this may cause some performance issues, specifically lag between an event and the program’s ability to respond (this might not be a big problem; I’ve never had any experience with Python).

C++ is a bit more complex, but it seems you already have people who know the language, so that’s not an issue. The real advantage to it is that it runs natively on VxWorks and therefore has the best performance out of the (currently) three languages available for programming: C++, Java, and Python.

Bottom line: C++ is a bit faster and more reliable than Python on the cRIO. Make your decision on C++ vs Python based on this and your programmers’ abilities in both languages.

The real advantage to it is that it runs natively on VxWorks and therefore has the best performance out of the (currently) three languages available for programming: C++, Java, and Python.

May I point out that LV also runs natively on VxWorks and is an official language for programming the cRIO.

Greg McKaskle

Are you sure that you can not use python with VxWorks? recently I have seen that they are compatible and that people are using it reliably you just need to port it differently.
Is this not the case?
:confused:

Python, last I checked, is not officially supported in FRC. While there are teams who do it, the three languages that are officially supported are Java, Labview, and C++.

I’d go with C++ this year. That way, you have a pretty good chance of getting help if you make a serious mistake. Do Python as an offseason thing and see where it takes you.