Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   NEW TO PYTHON (http://www.chiefdelphi.com/forums/showthread.php?t=135998)

FrankenmuthK 22-03-2015 13:29

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

TimTheGreat 22-03-2015 17:44

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.

Techwiz 23-03-2015 19:20

Re: NEW TO PYTHON
 
Quote:

Originally Posted by TimTheGreat (Post 1460685)
Stay away from command though.

Why do you recommend that to stay away from command based?

TimTheGreat 23-03-2015 20:02

Re: NEW TO PYTHON
 
Quote:

Originally Posted by Techwiz (Post 1461263)
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).

FrankenmuthK 23-03-2015 21:59

Re: NEW TO PYTHON
 
Quote:

Originally Posted by Techwiz (Post 1461263)
Why do you recommend that to stay away from command based?

What would you suggest for a new python programmer?

x86_4819 23-03-2015 22:53

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.

TimTheGreat 23-03-2015 22:57

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.

TimTheGreat 23-03-2015 23:02

Re: NEW TO PYTHON
 
Quote:

Originally Posted by FrankenmuthK (Post 1461346)
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.

virtuald 24-03-2015 00:00

Re: NEW TO PYTHON
 
Quote:

Originally Posted by FrankenmuthK (Post 1461346)
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:

Fauge7 24-03-2015 00:15

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.

Techwiz 24-03-2015 09:31

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.

TimTheGreat 24-03-2015 10:58

Re: NEW TO PYTHON
 
Quote:

Originally Posted by Techwiz (Post 1461498)
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?

x86_4819 24-03-2015 11:01

Re: NEW TO PYTHON
 
Quote:

Originally Posted by Techwiz (Post 1461498)

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.

FrankenmuthK 24-03-2015 14:03

Re: NEW TO PYTHON
 
Quote:

Originally Posted by x86_4819 (Post 1461380)
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

FrankenmuthK 24-03-2015 14:04

Re: NEW TO PYTHON
 
Quote:

Originally Posted by virtuald (Post 1461421)
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


All times are GMT -5. The time now is 19:49.

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