|
|
|
![]() |
|
|||||||
|
||||||||
| View Poll Results: Have you, or do you plan to use Python for Robot code? | |||
| Never used it before, and probably never will. |
|
17 | 58.62% |
| Used it in the past, but probably not this year. |
|
0 | 0% |
| Haven't used it before, but plan to this year. |
|
6 | 20.69% |
| Used it last year, and probably will use it again this year. |
|
5 | 17.24% |
| What is python? |
|
1 | 3.45% |
| Voters: 29. You may not vote on this poll | |||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Teams who have used or plan to use python for Robot Code
I thought that this might be an interesting metric to see.
|
|
#2
|
|||
|
|||
|
Re: Teams who have used or plan to use python for Robot Code
You left out:
|
|
#3
|
|||
|
|||
|
Re: Teams who have used or plan to use python for Robot Code
I'd prefer to see, "Haven't used it before, will be experimenting with it this season and hope to use it in the future"
We contemplated switching over to Python this year but with a new batch of students and a new controller, a new language seemed a bit much. |
|
#4
|
|||||
|
|||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
|
|
#5
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
Kinda confused about this--Python is a MUCH easier language to learn then C++ or Java, or even labview in some ways. Mind explaining what you mean? |
|
#6
|
|||||
|
|||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
This is just my assumption though. |
|
#7
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
The biggest barrier at the moment to using python is community support. The group of teams using python is currently rather small, but it is growing rapidly. More and more teams are becoming aware of it's validity as an frc programming language |
|
#8
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
It is correct to say that python is not officially supported by FRC, and that at a competition if you have a problem there will be less teams that will be able to help you with a language-specific problem.
However (as far as I know), because of the WPILib interface has been identical to the supported languages, most problems that people have when using python in FRC are the typical problems that anyone else in FRC has -- how to use the various devices that WPILib provides you. This means that other teams at a competition can help you, as long as you don't have a language specific problem. It's the same reason Java and C++ teams can help each other. In it's 4 year history, there have been very few problems that affected the python WPILib that did not also affect the other languages. In 2015, the WPILib interface will be 100% python, instead of wrappers, so this year it is arguably more risky to use than in previous years. Once again though, the interface will be identical to a supported language. Additionally, we've created a lot of unit tests, and are aiming for high test coverage to mitigate those potential problems. Additionally, in 2015 python will have expanded language-specific documentation, full gazebo simulation support, and eclipse plugins with similar functionality to the C++/Java functionality. |
|
#9
|
|||||
|
|||||
|
Re: Teams who have used or plan to use python for Robot Code
Thank you for your hard work on this. I'm excited to try this out this season.
How will the imaging be done for python? |
|
#10
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
One thing that I'm hoping to do is make it super easy to install other python packages on the robot too. That too, is TBD. However, I've got a lot of vacation/holiday time coming up... ![]() For anyone interested in contributing to RobotPy, let me know, and I'll give you read access to our 2015 github repositories + wpilib source for 2015. There's a lot of work done -- and yet still a lot to finish up! The more people that contribute, the better the end product will be. |
|
#11
|
|||
|
|||
|
Re: Teams who have used or plan to use python for Robot Code
There's a debugging and support cost. Java/C++ are very well supported and coming on CD and asking a question nets you a wide group that can answer questions. At events the CSA and likely a half dozen teams know the language and can help you debug. Python has less of a group.
|
|
#12
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
![]() |
|
#13
|
||||
|
||||
|
The issue I am having in deciding which language or team should use this year is which is the most useful to learn. Many of the rookies are completely new to programming in general and for that reason I thought python is the easiest to get started with; however, I am not a huge fan of Java even though we have used it for the past few years. What are the general opinions on C?
|
|
#14
|
||||
|
||||
|
Re: Teams who have used or plan to use python for Robot Code
Quote:
However, the thing that is argubly most important is teaching your students how to properly think about problems, and break them down and solve them. Once they know how to think about the problems, the rest is "just syntax"*. Another possibility is to write the code in multiple languages. Python and java aren't that dissimilar*, and once you figure out the hard part -- eg, how the robot code needs to interact with the hardware -- making it work in multiple languages is a pretty easy exercise IMHO. Seeing the same thing expressed in two different ways may help the student's comprehension. * Ok, ok, I'm oversimplifying here.. |
|
#15
|
|||
|
|||
|
Re: Teams who have used or plan to use python for Robot Code
Just providing some additional datapoints we use in helping choosing a language for our team.
First to answer the OP question: We used the python port of network tables last year, and plan to use it again if available in 2015. We program the robot in Java, and Vision in C++. We teach our kids Java only because that is most likely the language they will be learning going to college, so we feel this gives them a leg up on the rest of applicants. After all, that is our primary mission. It is very important to make the distinction for your team: Are you a team who has mentors whom can teach the language and solve problems, or is your team student driven, and they wish to follow a certain language. If the students are passionate about a certain language, try your best to accommodate that above all else. Student Interest trumps rationale. My first language was C++ and assembly of a 8051. In terms of easy to learn: My opinion is that Java is a good first start language, especially for someone who hasn't programed before. The reason I say this is because Java is still a compiled language (technical it is 1/2 compiled and 1/2 interpreted), and the sytax it has is pretty easily identifiable in many other mainstream languages (C++/C# which are used extensively in industries today). For our specific use of Robotics because Java is a compiled language some errors can be identified at compile time, making code easier to debug, and faster to correct. There are still run-time errors that you can not get away from. Python is a scripting language and its syntax is very similar to other scripting languages like Matlab (which I use everyday at work) but is rather different than mainstream languages. I think it is easier to learn Python syntax after knowing Java, then trying to learn Java syntax after knowing python. I believe it is a lot easier to remove things from syntax, than to add them (like the necessity of brackets in Java, but the lack of them in python). (I also believe it is easier to learn Java after knowing C++, rather than trying to learn C++ after knowing Java, like dealing with destructors) Python, is not a compiled language, it is an interpreted language, so the only errors you find are that at run-time. In my opinion, and this is only my opinion, it is harder to program Robots because errors are caught much later in the process. Now, if FRC was a work assignment that I was doing on my own, my language of choice would be C++. This is because our task is an embedded application, and the C++ language gives the advanced user extreme control over execution, direct access to the operating system, and we get rid of any interpreter overhead by the java virtual machine. However, because our goal is to give our students experience in a language they are more likely to use in college and personal projects (mobile apps, etc.), our language of choice is Java. In the end, it doesn't really matter what language you choose, all can get the job done in FRC as we have seen over the years, choosing the language which best suits your team must come from some external reason. There is no right answer for FRC alone. However, one pro of python is that you can write the same application much quicker and with a lot fewer lines than its C++ or Java counter part. That's because python removes all the extraneous syntax. When coding advanced algorithms, I typically code them in matlab first (another scripting language), just to get the logic right and not have to worry about syntax of Java and C++. Python and Matlab has that "It just works" feeling when writing code. Once I have the algorithm set in the scripting language, I can convert it to Java or C++, its a much quicker and easier process. Also, python modules for scientific calcs blow Java and c++ libraries for similar purposes out of the water in my opinion in terms of availability and ease of use. Hope this helps, Kevin P.S I am fully aware there are modules which you can use to compile python first, but in my opinion, its a waste of the reason you use the python language. Let the python interpreter compile and interpret in real time, with the efficiencies built in, like it was meant to do. P.P.S Thank you to all that are working on the python FRC port. It is an invaluable resource, and without their efforts we wouldn't even be able to consider python an option. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|