Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   RobotPy 2011.1 (http://www.chiefdelphi.com/forums/showthread.php?t=88746)

Peter Johnson 11-01-2011 02:21

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.

Slix 11-01-2011 18:41

Re: RobotPy 2011.1
 
Cool.
Quote:

Originally Posted by Peter Johnson (Post 996505)
  • 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 (Post 996505)
  • SIP is now used instead of SWIG for WPILib wrapper generation. This makes the library feel much more Pythonic.

What did that change?

Peter Johnson 11-01-2011 20:09

Re: RobotPy 2011.1
 
Quote:

Originally Posted by Slix (Post 997222)
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.

Slix 11-01-2011 20:29

Re: RobotPy 2011.1
 
Quote:

Originally Posted by Peter Johnson (Post 997356)
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.

blakeelias 12-01-2011 17:29

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?

Robototes2412 12-01-2011 23:43

Re: RobotPy 2011.1
 
yes, its just in the _wpilib.out file

Good job on this, i'm gonna hack in basic camera stuff

Peter Johnson 13-01-2011 03:10

Re: RobotPy 2011.1
 
Quote:

Originally Posted by blakeelias (Post 998347)
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.

CapnKernel 13-01-2011 19:08

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.

blakeelias 13-01-2011 21:13

Re: RobotPy 2011.1
 
Quote:

Originally Posted by Peter Johnson (Post 998847)
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.

blakeelias 13-01-2011 21:16

Re: RobotPy 2011.1
 
Quote:

Originally Posted by Robototes2412 (Post 998762)
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.

Peter Johnson 13-01-2011 23:45

Re: RobotPy 2011.1
 
Quote:

Originally Posted by CapnKernel (Post 999394)
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.

Peter Johnson 13-01-2011 23:47

Re: RobotPy 2011.1
 
Quote:

Originally Posted by blakeelias (Post 999522)
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.


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

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