Go to Post If I had a mul-let then I'd look like Andy Baker used to and that would be ba-ad, really ba-ad. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
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
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 23-12-2014, 17:42
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
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 which to follow a certain language. If the students are passionate about a certain language, try your best to accommodate that.

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.
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi