Go to Post Hey, I'm not my dad, I dont know anything! - Lil' Lavery [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 11-01-2011, 02:21
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: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
RobotPy 2011.1

I'm happy to announce the first version of RobotPy (Python for FRC) for the 2011 season, 2011.1.

http://firstforge.wpi.edu/sf/projects/robotpy

Major changes from 2010.beta2 release:
  • 2011 WPILib module that includes all 2011 updated classes and functions.
  • SIP is now used instead of SWIG for WPILib wrapper generation. This makes the library feel much more Pythonic.
  • Stack size has been increased to 128K per thread. This enables many more modules to be used.
  • Hash modules (sha, md5) now work.
  • Absolute paths used to find boot.py and libraries.
  • Exception catching and 5 second restart code is now in boot.py instead of at the C++ level. If boot.py exits, so does the C++ UserProgram.out. This enables easier customization of restart functionality.

Thanks to Austin Schuh and Dustin Spicuzza for their testing, bug reports, and patches!

Per discussion in other threads, expect another release by next weekend to change restart functionality to be a bit more user-friendly, and possibly the inclusion of winpdb for debugging.
__________________
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
  #2   Spotlight this post!  
Unread 11-01-2011, 18:41
Slix Slix is offline
Registered User
AKA: Peter Kowalczyk
FRC #2115 (NightMares)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Mundelein, IL
Posts: 31
Slix is an unknown quantity at this point
Re: RobotPy 2011.1

Cool.
Quote:
Originally Posted by Peter Johnson View Post
  • 2011 WPILib module that includes all 2011 updated classes and functions.
So the camera stuff hasn't been put in yet? (It sounds like the camera could be important this year.)

Quote:
Originally Posted by Peter Johnson View Post
  • SIP is now used instead of SWIG for WPILib wrapper generation. This makes the library feel much more Pythonic.
What did that change?
Reply With Quote
  #3   Spotlight this post!  
Unread 11-01-2011, 20:09
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: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy 2011.1

Quote:
Originally Posted by Slix View Post
Cool.


So the camera stuff hasn't been put in yet? (It sounds like the camera could be important this year.)


What did that change?
Sorry, no, the camera/image processing library is not yet included. I'm aware it'll likely be important this year so I'll be working on it this week and those classes will be in the 2011.2 release (slated for this weekend/early next week).

Changing to SIP makes it possible to create derived classes from all WPILib classes. Also, static functions are now part of their class (ClassName.StaticName()) instead of being renamed to ClassName_StaticName(). I need to update the wiki to reflect this.
__________________
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
  #4   Spotlight this post!  
Unread 11-01-2011, 20:29
Slix Slix is offline
Registered User
AKA: Peter Kowalczyk
FRC #2115 (NightMares)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Mundelein, IL
Posts: 31
Slix is an unknown quantity at this point
Re: RobotPy 2011.1

Quote:
Originally Posted by Peter Johnson View Post
Sorry, no, the camera/image processing library is not yet included. I'm aware it'll likely be important this year so I'll be working on it this week and those classes will be in the 2011.2 release (slated for this weekend/early next week).
Great! That addition will be a huge help in convincing my team that we won't lose much by switching to Python.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2011, 17:29
blakeelias's Avatar
blakeelias blakeelias is offline
2011 CT chairman's award
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: New York
Posts: 26
blakeelias is an unknown quantity at this point
Re: RobotPy 2011.1

It seems that RobotPy 2011.1 doesn't have the Victor class any more, though it is in the 2011 WPILib. Can we still use it?
Reply With Quote
  #6   Spotlight this post!  
Unread 12-01-2011, 23:43
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: RobotPy 2011.1

yes, its just in the _wpilib.out file

Good job on this, i'm gonna hack in basic camera stuff
Reply With Quote
  #7   Spotlight this post!  
Unread 13-01-2011, 03:10
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: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy 2011.1

Quote:
Originally Posted by blakeelias View Post
It seems that RobotPy 2011.1 doesn't have the Victor class any more, though it is in the 2011 WPILib. Can we still use it?
Oops that's a bug! I'll fix it in git tonight and it'll be fixed in the 2011.2 release.
__________________
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
  #8   Spotlight this post!  
Unread 13-01-2011, 19:08
CapnKernel CapnKernel is offline
Parse Error on line: Unknown
FRC #1515 (MorTorq)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Beverly Hills
Posts: 13
CapnKernel has a spectacular aura aboutCapnKernel has a spectacular aura about
Re: RobotPy 2011.1

This looks awesome! Any chance of using the python naming conventions (snake-case methods)? If not, I can create a wrapper for the classes I use.

Great work, I'll definitely help out with testing.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-01-2011, 21:13
blakeelias's Avatar
blakeelias blakeelias is offline
2011 CT chairman's award
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: New York
Posts: 26
blakeelias is an unknown quantity at this point
Re: RobotPy 2011.1

Quote:
Originally Posted by Peter Johnson View Post
Oops that's a bug! I'll fix it in git tonight and it'll be fixed in the 2011.2 release.
Great! Can't wait to test it.
Reply With Quote
  #10   Spotlight this post!  
Unread 13-01-2011, 21:16
blakeelias's Avatar
blakeelias blakeelias is offline
2011 CT chairman's award
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: New York
Posts: 26
blakeelias is an unknown quantity at this point
Re: RobotPy 2011.1

Quote:
Originally Posted by Robototes2412 View Post
yes, its just in the _wpilib.out file
I tried to make a wrapper class for _wpilib.Victor, but was unsuccessful. I guess I did something wrong.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-01-2011, 23:45
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: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy 2011.1

Quote:
Originally Posted by CapnKernel View Post
This looks awesome! Any chance of using the python naming conventions (snake-case methods)? If not, I can create a wrapper for the classes I use.
When I first wrappered the C++ classes, the easiest approach was to keep the C++ naming. Plus it means you can pretty easily use the C++ WPILib reference to find out function names. It's relatively straightforward to annotate the .sip files to rename each function to PEP 8's lower_case convention, but I do not plan on doing so for 2011 as it would break everyone's code who already started using 2011.1. I will consider renaming to follow Python naming conventions for 2012 if there's sufficient community desire to do so.
__________________
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
  #12   Spotlight this post!  
Unread 13-01-2011, 23:47
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: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy 2011.1

Quote:
Originally Posted by blakeelias View Post
I tried to make a wrapper class for _wpilib.Victor, but was unsuccessful. I guess I did something wrong.
The Python wrapper class was accidentally not compiled into _wpilib.out, so it's impossible to get access to it from Python. I'm going to try to get the new release out tomorrow night.
__________________
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
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 06:26.

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