View Full Version : Python's Legality
Robby Unruh
05-01-2011, 08:28
Nice new section. :eek:
Has FIRST said anything about the legality of python being used in 2011 robots yet? I'd love to give this a shot.
Al Skierkiewicz
05-01-2011, 08:42
Robby,
There is a distinct interaction between robot control programming and the field control system. The need to be able to start and guarantee to stop robots on the field may better answer your question. The engineering staff needs to be able to test for safety the programming languages that it supports.
jtdowney
05-01-2011, 08:45
As far as I know they haven't yet ruled on the ability to program the robot outside of C++, Java, and LabView. On Saturday when we all the read the manual they might make a ruling but my gut reaction is we would have heard officially by now if a new language is available (like Java was announced for 2010 at the 2009 CMP).
demosthenes2k8
05-01-2011, 08:56
we would have heard officially by now if a new language is available (like Java was announced for 2010 at the 2009 CMP).
The difference between that and Python is that Java was developed "officially", endorsed by FIRST. Python was developed by a team who (AFAIK) doesn't work for FIRST, so FIRST wouldn't announce it. They would have to specifically say "All team-developed languages are fine", or "X is fine, but not Y because Z"
The FIRST offical Q&A is the place to ask the question, and I'd love to hear the answer. Sadly the 2011 game isn't posted yet, but you should ask it on kickoff day.
I think the Python and Lua ports are great, I'd love to see teams use them.
virtuald
05-01-2011, 12:39
As far as I'm concerned [and as cited on the RobotPy wiki], python is just another C++ program running on vxWorks, so it shouldn't be a problem. IMHO, if the safety protocols can't shut down the robot with this program running on there, then there's something else wrong with the safety protocols that needs to be addressed.
With that being said, since it isn't officially supported by FRC at this time you're taking a bigger risk in using it since any problems you may run into will be a bit harder to tackle.
If they did decide to ban it though, that would be quite unfortunate. I wonder how they would word it.
If the safety protocols (E-stop in particular) don't shut down the outputs, there is either something wrong with your cRIO image, or you are using something other than the PWM, Relay, and Solenoid outputs to control your motors/cylinders.
Peter Johnson
08-01-2011, 19:38
My opinion (of course), but looks like RobotPy (and other scripting languages such as Lua) will be legal for 2011:
COTS definition (page 8 of Section 1):
"For the purposes of the FRC, generally available software modules obtained from open sources (e.g. professional publications, commonly used FRC community-accessible web resources, industry source code repositories, etc.) that are not specifically affiliated with individual FRC teams shall be considered COTS items."
<R28> COTS items that are generally available may be used on the ROBOT.
Caveat emptor, of course. And keep in mind RobotPy is not supported by FIRST (so if you run into issues with RobotPy at a competition, there won't be staff there to help).
My opinion (of course), but looks like RobotPy (and other scripting languages such as Lua) will be legal for 2011:
COTS definition (page 8 of Section 1):
"For the purposes of the FRC, generally available software modules obtained from open sources (e.g. professional publications, commonly used FRC community-accessible web resources, industry source code repositories, etc.) that are not specifically affiliated with individual FRC teams shall be considered COTS items."
<R28> COTS items that are generally available may be used on the ROBOT.
Caveat emptor, of course. And keep in mind RobotPy is not supported by FIRST (so if you run into issues with RobotPy at a competition, there won't be staff there to help).
I tend to agree with your assessment. All of the safety protocols are handled in the FPGA and the FRC_NetworkCommunication task. As such, nothing that RobotPy or Greyhound Lua can do will allow any avenue to get around the safety features. In addition, both of these implement their robot I/O access by scripting a wrapper around WPILib for C++ using SWIG. I can't imagine that FIRST would see any reason to disallow the use of these languages, but the final say is theirs.
-Joe
blakeelias
09-01-2011, 02:40
Since the creator of RobotPy is a team mentor, does that make it "specifically affiliated" with his team?
mobilegamer999
09-01-2011, 03:02
Since the creator of RobotPy is a team mentor, does that make it "specifically affiliated" with his team?
He may have made RobotPy, but all that really is, is a nice, neatly compiled c++ program that runs python code, so technically the creator is the creator of Python, not RobotPy.
He may have made RobotPy, but all that really is, is a nice, neatly compiled c++ program that runs python code, so technically the creator is the creator of Python, not RobotPy.
Uhm, Johnson has copyright, so I think we can establish that he created RobotPy. Someone really has to ask about using Python in Q&A, though I think it's extremely unlikely that they will say no.
Joe Ross
09-01-2011, 10:16
COTS definition (page 8 of Section 1):
"For the purposes of the FRC, generally available software modules obtained from open sources (e.g. professional publications, commonly used FRC community-accessible web resources, industry source code repositories, etc.) that are not specifically affiliated with individual FRC teams shall be considered COTS items."
Since the creator of RobotPy is a team mentor, does that make it "specifically affiliated" with his team?
If you parse the definition, you'll notice it's talking about where you receive the software, not who created the software (obtained being the key word). If Peter emailed you the software and did not email it to anyone else, it would not be legal. If Peter hid it on his team's website where nobody else would find it, it would not be legal because the source would be affiliated with his team. Since he posted the code on FIRST Forge, which is a "commonly used FRC community-accessible web resources" it is legal.
BradAMiller
09-01-2011, 14:58
I tend to agree (no affiliation with FIRST or the GDC) that Python ought to be legal because:
It's publically available (a COTS part)
It really is just a C++ program that gets its robot commands from a text file (script).
But, again, I don't work for FIRST.
Brad
Official GDC response: http://forums.usfirst.org/showthread.php?t=16448
Pretty much identical to most of the assumptions made in this thread and in the RobotPy FAQ.
Salado Robotics
16-02-2011, 11:32
Python is a very high level, abstract language that should not be grouped with C++ or Java when it comes to legality because in the end, Python is so high it can compile down into C++ using a variety of free, open-source compilers available out there ( http://shed-skin.blogspot.com/ ). I wouldn't jump to say this makes it legal, but in the case running the Py runtime on the cRIO is not allowed come gametime... code in python .. and then compile down to C++.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.