Go to Post Thank you lord I knew there was a reason I got 10 books on autonomous robotics. - Adam Y. [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-03-2015, 13:29
FrankenmuthK's Avatar
FrankenmuthK FrankenmuthK is offline
Registered User
FRC #5215
 
Join Date: Jan 2015
Location: United States
Posts: 34
FrankenmuthK is an unknown quantity at this point
Arrow NEW TO PYTHON

New programmer to python... Looking for tips, instructions on how to program for FRC, and anything else I need! Thanks

Steagles 5215
Reply With Quote
  #2   Spotlight this post!  
Unread 22-03-2015, 17:44
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NEW TO PYTHON

Welcome. You have made a great choice in switching to python.

http://robotpy.readthedocs.org/en/la...ide/index.html

This is documentation for wpilib, python style. Most of what you are looking for is in here. For choosing a 'method' of robot programming, iterative is pretty straightforward, and if you are up to it go with sample robot. Stay away from command though.

If you have any more questions, just ask. Robotpy (the libraries for FRC python) has a freenode channel, http://webchat.freenode.net/ #robotpy and 1418 programmers are generally on, and we're always glad to help.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #3   Spotlight this post!  
Unread 23-03-2015, 19:20
Techwiz's Avatar
Techwiz Techwiz is offline
Blake B
AKA: Blake
FRC #4909 (The Bionics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Massachusetts
Posts: 84
Techwiz will become famous soon enough
Re: NEW TO PYTHON

Quote:
Originally Posted by TimTheGreat View Post
Stay away from command though.
Why do you recommend that to stay away from command based?
__________________
Blake
Electrical, Programming and Design

Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)
Reply With Quote
  #4   Spotlight this post!  
Unread 23-03-2015, 20:02
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NEW TO PYTHON

Quote:
Originally Posted by Techwiz View Post
Why do you recommend that to stay away from command based?
Even though FIRST recommends using Iterative or Command Based, command based is generally found to be harder, but more so that Iterative/Sample are just so easy in python. There's also more support for them (forum wise).
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #5   Spotlight this post!  
Unread 23-03-2015, 21:59
FrankenmuthK's Avatar
FrankenmuthK FrankenmuthK is offline
Registered User
FRC #5215
 
Join Date: Jan 2015
Location: United States
Posts: 34
FrankenmuthK is an unknown quantity at this point
Re: NEW TO PYTHON

Quote:
Originally Posted by Techwiz View Post
Why do you recommend that to stay away from command based?
What would you suggest for a new python programmer?
Reply With Quote
  #6   Spotlight this post!  
Unread 23-03-2015, 22:53
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: NEW TO PYTHON

Now i'm curious, did you see my team's display about python at the Great Lakes Bay Reigon Competition?

If you have never programmed in python before, you might want to start by learning the basics of the language before diving into programming FRC robots. I have found that codeacademy.com has a pretty good primer for learning basic python.
__________________




My Github Repositories
Reply With Quote
  #7   Spotlight this post!  
Unread 23-03-2015, 22:57
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NEW TO PYTHON

Dustin Spicuzza (virtualD) has also created a python learning package called pybasictraining. You can find it in Team 1418's github, https://github.com/frc1418/pybasictraining.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #8   Spotlight this post!  
Unread 23-03-2015, 23:02
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NEW TO PYTHON

Quote:
Originally Posted by FrankenmuthK View Post
What would you suggest for a new python programmer?
Well... that's tough. Because python is so versatile, the only real difference between iterative and sample is that in sample you create your own loops. This can, however, be hard. So I think your safest route would be iterative. It is very easy to understand and you get the same capabilities as sample robot.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #9   Spotlight this post!  
Unread 24-03-2015, 00:00
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,040
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: NEW TO PYTHON

Quote:
Originally Posted by FrankenmuthK View Post
What would you suggest for a new python programmer?
As said previously, learning the python language in general is a good place to start.

Python in FRC has a simulator that you can use to test the programs out that you create, and there's a number of examples available to look at:
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #10   Spotlight this post!  
Unread 24-03-2015, 00:15
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: NEW TO PYTHON

Command based is made for more object orientedness. If you really want to do those the simplest way would be to use java/c++. Stick to iterative though because you seem many teams trying to do their own stuff in simple and it ends up not being simple. Python is still a great language for frc and i hope to see it more developed.
Reply With Quote
  #11   Spotlight this post!  
Unread 24-03-2015, 09:31
Techwiz's Avatar
Techwiz Techwiz is offline
Blake B
AKA: Blake
FRC #4909 (The Bionics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Massachusetts
Posts: 84
Techwiz will become famous soon enough
Re: NEW TO PYTHON

This year we used Java and command based. For the most part we love how command based allows us to have the appearance of doing multiple things at the same time. A couple of the student members have got a pretty good handle on how to write command based code.

As the programming mentor I find java to be very verbose. We find eclipse to be very cumbersome and heavy. I severely miss the days of netbeans. We were thinking about trying python with JetBrains pyCharm.

@x86_4819
Quote:
Now i'm curious, did you see my team's display about python at the Great Lakes Bay Reigon Competition?
I did not see you display. Is there photos of it anywhere? My team is from Maine so we haven't quite traveled that far.
__________________
Blake
Electrical, Programming and Design

Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)
Reply With Quote
  #12   Spotlight this post!  
Unread 24-03-2015, 10:58
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NEW TO PYTHON

Quote:
Originally Posted by Techwiz View Post
We find eclipse to be very...heavy.
Why do you find it heavy? Is there something wrong with earth's gravitational pull where you live?
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #13   Spotlight this post!  
Unread 24-03-2015, 11:01
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: NEW TO PYTHON

Quote:
Originally Posted by Techwiz View Post

I did not see you display. Is there photos of it anywhere? My team is from Maine so we haven't quite traveled that far.
Sorry, I was trying to ask FrankenmuthK.
__________________




My Github Repositories
Reply With Quote
  #14   Spotlight this post!  
Unread 24-03-2015, 14:03
FrankenmuthK's Avatar
FrankenmuthK FrankenmuthK is offline
Registered User
FRC #5215
 
Join Date: Jan 2015
Location: United States
Posts: 34
FrankenmuthK is an unknown quantity at this point
Re: NEW TO PYTHON

Quote:
Originally Posted by x86_4819 View Post
Now i'm curious, did you see my team's display about python at the Great Lakes Bay Reigon Competition?

If you have never programmed in python before, you might want to start by learning the basics of the language before diving into programming FRC robots. I have found that codeacademy.com has a pretty good primer for learning basic python.
I did not see it
Reply With Quote
  #15   Spotlight this post!  
Unread 24-03-2015, 14:04
FrankenmuthK's Avatar
FrankenmuthK FrankenmuthK is offline
Registered User
FRC #5215
 
Join Date: Jan 2015
Location: United States
Posts: 34
FrankenmuthK is an unknown quantity at this point
Re: NEW TO PYTHON

Quote:
Originally Posted by virtuald View Post
As said previously, learning the python language in general is a good place to start.

Python in FRC has a simulator that you can use to test the programs out that you create, and there's a number of examples available to look at:
Where would I find the simulator
Reply With Quote
Reply


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 19:49.

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