Go to Post The great thing about autonomous mode is that it doesn't require any additional effort from anyone else on your team... (You could do that yourself...but I've noticed that people will usually offer to do it for you, rather than let the programmer touch power tools.) - jgannon [more]
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

Thread Tools Rating: Thread Rating: 24 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-25-2010, 11:49 PM
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 524
Peter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant future
RobotPy: Python for FRC

After being inspired by Ross Light and Team 973's success in porting Lua to the cRIO (see the "Announcing FIRSTLua" thread), I have completed a port of Python to the cRIO, called RobotPy.

RobotPy is a fully functioning port of Python 3.1.2 that can be used for programming your FRC robot. The full set of WPILib functions, including CANJaguar, is available in Python via "import wpilib".

As with the Lua port,
  • Python is easier to learn than C
  • Live code reloads
  • Errors won't crash the robot
  • Python provides automatic garbage collection
  • WindRiver isn't needed after the base code is installed. Just a text editor and an FTP client.

I've performed some initial testing on Team 294's 2010 robot, including running CAN bus Jaguars and compressors and pneumatics. Examples and installation documentation are available on the website and are also included in the download. Also, the download .zip file includes a prebuilt FRC_UserProgram.out, so you don't need to have any programming software installed to get up and running (just FTP a bunch of files to your robot)! Please report any bugs you find via the RobotPy website's ticket system (note: registration is required).

RobotPy website: http://www.tortall.net/projects/robotpy/

While the download .zip doesn't include the source code, it is available via a git repository. See the Download page on the website for details.

With the exception of modules with large dependencies (e.g. databases), almost all of the Python standard library is included. So yes, you can parse XML files with expat on the robot if you so choose . Much of this is untested however (I have not tried to run the Python test suite on the robot).

Major thanks go to Ross Light and Team 973; this project would not have happened without them creating FIRSTLua first to inspire me to port Python. RobotPy uses the WPILib SWIG wrapper created by Ross, with the addition of CANJaguar. The idea of using a boot script to auto-reload the user code is also taken from FIRSTLua.
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Im doing something wrong here (python) Robototes2412 Programming 9 08-30-2010 11:05 PM
Programing with Python Lord Byron Programming 5 08-25-2009 09:26 PM
Looking for FRC teams for calendar fundraiser SciDKelly134 Fundraising 9 06-18-2009 10:55 AM
Favorite Monty Python Sketch/Movie Joe Matt Chit-Chat 47 03-30-2004 08:45 PM
monty python [split from thread: big jump, up to 131] Carolyn Duncan Chit-Chat 23 07-30-2001 07:46 PM

All times are GMT -5. The time now is 12:46 AM.

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

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