View Full Version : Question about Python?
mechanical_robot
12-12-2013, 00:36
I am confuse looking at the programming the forums. Are we allowed to use Python on our robots for the competitions? Or no
Also how would we set Python up to be able to use it on the cRio.
geomapguy
12-12-2013, 01:07
Well I've heard of some teams using Python but it's not official
Check out these forums
http://www.chiefdelphi.com/forums/showthread.php?t=94413
Here's Team 2423 robot code written in Python
http://www.virtualroadside.com/FRC/#KwarqsDashboard
calcmogul
12-12-2013, 01:17
The package hosted at http://firstforge.wpi.edu/sf/frs/do/viewRelease/projects.robotpy/frs.robotpy.2013_4 on FirstForge provides instructions for setting RobotPy (Python) up on a cRIO with the C++ image.
mechanical_robot
12-12-2013, 06:06
Well I've heard of some teams using Python but it's not official
Check out these forums
http://www.chiefdelphi.com/forums/showthread.php?t=94413
Here's Team 2423 robot code written in Python
http://www.virtualroadside.com/FRC/#KwarqsDashboard
So we can use it fort competitions , but python is not official or supported yet.
geomapguy
12-12-2013, 08:22
So we can use it fort competitions , but python is not official or supported yet.
Don't quote me, but I'm 100% positive
So we can use it fort competitions , but python is not official or supported yet.
Yes, you can use Python in competition, as I saw teams using it last year. You still have to use the FRC Utilities software on the controller laptop. Just don't expect to get help troubleshooting from other teams or the volunteers at the competition if you choose to go that route.
I'm still trying to figure out why teams feel Java or C++ is not sufficient that they need to go Python. Just to do things differently and prove a point?
Someone feel free to enlighten me...
By the way, interesting observation on SpaceX regarding patents. I didn't know that...but Tesla (and Paypal) do have plenty of patents so I'm not sure why Elon is being inconsistent in his psychology.
Well, Python is a Simple and "elegant-syntaxed" language. It is very easy to teach to newbies, many times easier than Java or C! Other than that, it is cross-platform because it is interpreted!
There are also lots of tutorials to teach it.
Learning it is also inexpensive. The Raspberry Pi is a good way to learn Python because that is the most encouraged language for the platform!
geomapguy
12-12-2013, 19:19
Well, Python is a Simple and "elegant-syntaxed" language. It is very easy to teach to newbies, many times easier than Java or C!
Don't forget LabVIEW is super easy to teach and is regarded as the newbie language.(and also a very complex language)
There are also lots of tutorials to teach it.
I'm pretty sure the other FRC languages are well documented by FRC, NI, WPI, and various teams.
yes. That is true. LabView can be easy if you wan tit to be easy and hard if you want it to be hard.
It is true that there are all sorts of FRC tutorials. However, the Python tutorials are more generalized and from a much wider audience!
mechanical_robot
12-12-2013, 21:11
Yes, you can use Python in competition, as I saw teams using it last year. You still have to use the FRC Utilities software on the controller laptop. Just don't expect to get help troubleshooting from other teams or the volunteers at the competition if you choose to go that route.
I'm still trying to figure out why teams feel Java or C++ is not sufficient that they need to go Python. Just to do things differently and prove a point?
Someone feel free to enlighten me...
By the way, interesting observation on SpaceX regarding patents. I didn't know that...but Tesla (and Paypal) do have plenty of patents so I'm not sure why Elon is being inconsistent in his psychology.
About the SpaceX patents, the reason is because there is nothing from stopping the chinese from stealing our rocket secrets. I mean their is a difference from cars and rockets. Rockets can be weaponized and SpaceX when they finally get to MArs the chinese will just try to steal the technology. Sorry but China can't invent they can only steal which is proven with the military technology they try to steal and replicate from our government/defense contractors.
As you can tell I am not a big fan of China to the verge of pretty much hating their government.
If I ever end of making a robotics business or something along those lines I will never work with the chinese.
Plus the technology they try to steal from us and replicate usually doesnt work :D :D
Plus the chinese have tooken American companies and their inventions and pretty much gave them to some chinese companie to benefit their economy.
Also the way the treat their people over there :(
MaxMax161
12-12-2013, 21:17
As stated above while it appears to be possible to use python it is not recomended. At the moment I think it would take more work to get python working well then to simply use one of the three supported languages (Java, C++, LabVIEW).
It is true that there are all sorts of FRC tutorials. However, the Python tutorials are more generalized and from a much wider audience!
I strongly disagree when you say Python tutorials are more generalized and from a much wider audience. The number of C++ and Java tutorials is staggering. Python may be an easy language to learn on your own, but with less FRC tutorials for Python, one of the supported languages would be much simpler to apply to FRC.
Java and C++ are used in, to my belief at least, the majority of applications. Being used in so many different applications, it would shocking to say the least to say there are more generalized and wider audienced tutorials for Python.
To the OP: Learning how to use Python in the offseason would be a great idea! However, with Kickoff rapidly approaching, you would most likely be better off using one of the supported languages. You can compare it to building a swerve drive with no prior experience in the build season.
MaxMax161
12-12-2013, 21:38
I strongly disagree when you say Python tutorials are more generalized and from a much wider audience. The number of C++ and Java tutorials is staggering. Python may be an easy language to learn on your own, but with less FRC tutorials for Python, one of the supported languages would be much simpler to apply to FRC.
Forgot to mention, the tutorials for nearly every single function of LabVIEW are amazing! Especially when it comes to FRC. EVERY single block has a tutorial and example it's involved in. Helped me a tremendous amount when first self teaching myself LabVIEW.
Forgot to mention, the tutorials for nearly every single function of LabVIEW are amazing! Especially when it comes to FRC. EVERY single block has a tutorial and example it's involved in. Helped me a tremendous amount when first self teaching myself LabVIEW.
Dead correct, can't believe I forgot to mention that!
About the SpaceX patents, the reason is because there is nothing from stopping the chinese from stealing our rocket secrets. I mean their is a difference from cars and rockets. Rockets can be weaponized and SpaceX when they finally get to MArs the chinese will just try to steal the technology. Sorry but China can't invent they can only steal which is proven with the military technology they try to steal and replicate from our government/defense contractors.
As you can tell I am not a big fan of China to the verge of pretty much hating their government.
If I ever end of making a robotics business or something along those lines I will never work with the chinese.
Plus the technology they try to steal from us and replicate usually doesnt work :D :D
Plus the chinese have tooken American companies and their inventions and pretty much gave them to some chinese companie to benefit their economy.
Also the way the treat their people over there :(
That's true, but patents can protect from theft by others in the country and can be coordinated in European countries as well. Not having a patent may let anyone, Chinese or other Americans, to use the technology. Keep in mind rockets are ITAR controlled and therefore even if a device is patented it can still be protected from the Chinese or another country attempting to access it.
jlmcmchl
13-12-2013, 16:04
Guys, the OP had a question about python, and it's use in FRC. Go ahead and group message about his sig, please.
mechanical_robot
13-12-2013, 19:19
That's true, but patents can protect from theft by others in the country and can be coordinated in European countries as well. Not having a patent may let anyone, Chinese or other Americans, to use the technology. Keep in mind rockets are ITAR controlled and therefore even if a device is patented it can still be protected from the Chinese or another country attempting to access it.
Please if you would like to continue with this conversation lets do it form messages. That way we don't clog up the forums.
brennonbrimhall
13-12-2013, 20:45
So we can use it fort competitions , but python is not official or supported yet.
RobotPy's implementation of Python uses the C++ image for the cRIO. Essentially, RobotPy's setup (to my understanding) simply stands in for the standard/normal C++ code that you'd write and interprets your Python.
While Python isn't officially supported (e.g., it's completely legal, but FIRST/other teams out there probably won't be able to help you), there are several benefits. The one that sticks out most in my mind is the fact that there's no compiling or cRIO reboot needed. Changing out code is as simple as FTPing over some Python files.
The one that sticks out most in my mind is the fact that there's no [...] cRIO reboot needed. Changing out code is as simple as FTPing over some Python files.
Last year 68 came up with a system of FTPing labview files that didn't require a cRIO reboot.
geomapguy
13-12-2013, 22:48
Last year 68 came up with a system of FTPing labview files that didn't require a cRIO reboot.
Really? Is there a CD thread about it??
No but here's the VERY basic jist of it.
Everything that we would want to change like Auton values, what speed the shooter should run, etc. Was stored as a certain file type(don't remember what type), and when Labview used those methods they would read the vlues from the file. Changing the files just required FTPing an editted version of the file. Atleast that's how understand it.
If you want to know more detail I can try to get 68's Programming mentor to post in here.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.