OCCRA
Go to Post I have to remind myself you guys are from Kansas when I hear the country music...I'm not even sure any Texas Teams do that ;) - JohnSchneider [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Events   CD-Media   CD-Spy   FRC-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 01-15-2011, 03:49 AM
Peter Johnson Peter Johnson is offline
With great power comes great I^2*R
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 139
Peter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to behold
RobotPy 2011.2

I've released RobotPy (Python for FRC) 2011.2.

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

Major changes from 2011.1 release:
  • Victor class is now available in wpilib.
  • PCVideoServer class is available via "import vision". The other vision classes are not yet available.

Sorry for not getting the vision classes done for this release, but I felt the lack of the Victor class demanded a quick release. I'm actively working on them (holy cow is nivision huge!) but it'll take a few more days to complete.
__________________
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 01-17-2011, 03:36 PM
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.2

Sample code to activate camera

Code:
import vision
test_cam = vision.PCVideoServer()
Keep in mind that this only has the camera stream data to the dashboard at 320X240, that cannot be changed until nivision and all that other funky stuff is bound.

It is significantly laggy over wireless, but that is how it is for everyone.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-21-2011, 09:57 AM
BotnEyedJoe BotnEyedJoe is offline
Mentor
AKA: Joe Hurler
no team
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rosemont, PA
Posts: 29
BotnEyedJoe is an unknown quantity at this point
Re: RobotPy 2011.2

Thanks for this, Peter. It has been an awesome addition to the FRC world, and we have been using it intensely since its release.

Speaking only for ourselves regarding this: The vision lib would certainly be at the top of our 'love to have that' list (and you've mentioned that it is coming). The SmartDashboard looks interesting also - we did not find support for it in 11.2 - hope that's easy to add.

On a related note, perhaps you have time to share your viewpoint on where would someone interested in helping this effort begin (say, if they had some learning curve to overcome re: SIP and wrapping a new library)?
Reply With Quote
  #4   Spotlight this post!  
Unread 01-21-2011, 01:25 PM
byteit101's Avatar
byteit101 byteit101 is offline
Registered Code Monkey (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Sylvania
Posts: 665
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: RobotPy 2011.2

Quote:
Originally Posted by BotnEyedJoe View Post
The SmartDashboard looks interesting also - we did not find support for it in 11.2 - hope that's easy to add.
I'm working on getting ZomB to work with python, If you want to help me get it going, feel free to PM me.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI
Reply With Quote
  #5   Spotlight this post!  
Unread 01-21-2011, 05:29 PM
pmalmsten pmalmsten is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2006
Location: United States
Posts: 9
pmalmsten is on a distinguished road
Re: RobotPy 2011.2

Quote:
Originally Posted by BotnEyedJoe View Post
The SmartDashboard looks interesting also - we did not find support for it in 11.2 - hope that's easy to add.
Hi guys,

I'm the lead developer of the Smart Dashboard project. I haven't looked at any
of the Python code yet, but I would be happy to help port the robot side code. I'll take a look at that sometime in the next week or so.

That's pretty cool to have Python working on robots; thanks for your hard work Peter.

~Paul Malmsten
Reply With Quote
  #6   Spotlight this post!  
Unread 01-22-2011, 12:14 AM
Peter Johnson Peter Johnson is offline
With great power comes great I^2*R
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 139
Peter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to beholdPeter Johnson is a splendid one to behold
Re: RobotPy 2011.2

Quote:
Originally Posted by BotnEyedJoe View Post
Speaking only for ourselves regarding this: The vision lib would certainly be at the top of our 'love to have that' list (and you've mentioned that it is coming). The SmartDashboard looks interesting also - we did not find support for it in 11.2 - hope that's easy to add.

On a related note, perhaps you have time to share your viewpoint on where would someone interested in helping this effort begin (say, if they had some learning curve to overcome re: SIP and wrapping a new library)?
SmartDashboard should be in 11.2... at least I'm generating wrapper code for it. I've not tested it yet, but it should work, something like:
Code:
ds = wpilib.DriverStation.GetInstance()
dash = wpilib.SmartDashboard(ds.GetUserStatusDataSem())
ds.SetHighPriorityDashboardPackerToUse(dash)
I'm definitely working hard on the image processing stuff. Is it just the vision/vision2009 libraries that are useful, or do people really use a lot of stuff in nivision directly as well? Nivision is very large and raw C (rather than C++) so it's taking a lot of time to wrap it.

SIP is a good place to start, although SWIG can be used as well (although if your classes extend WPILib classes you'll need to use SIP). The next step is to check out the codebase (from git) and look at how the various packages are wrapped (WPILib namely).
__________________
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
  #7   Spotlight this post!  
Unread 01-23-2011, 06:29 PM
BotnEyedJoe BotnEyedJoe is offline
Mentor
AKA: Joe Hurler
no team
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rosemont, PA
Posts: 29
BotnEyedJoe is an unknown quantity at this point
Re: RobotPy 2011.2

Quote:
Originally Posted by Peter Johnson View Post
SmartDashboard should be in 11.2... at least I'm generating wrapper code for it. I've not tested it yet, but it should work, something like:
Code:
ds = wpilib.DriverStation.GetInstance()
dash = wpilib.SmartDashboard(ds.GetUserStatusDataSem())
ds.SetHighPriorityDashboardPackerToUse(dash)
I'm definitely working hard on the image processing stuff. Is it just the vision/vision2009 libraries that are useful, or do people really use a lot of stuff in nivision directly as well? Nivision is very large and raw C (rather than C++) so it's taking a lot of time to wrap it.

SIP is a good place to start, although SWIG can be used as well (although if your classes extend WPILib classes you'll need to use SIP). The next step is to check out the codebase (from git) and look at how the various packages are wrapped (WPILib namely).
OK, got the SmartDashboard working on the robot side with your example code - thanks! Something funky happening on the SmartDashboard client side though: each Log() call seems to create a new widget; I'll have to investigate this further.

I think the vision/vision2009 interfaces have been the most useful to us up 'til now; we have not yet had to delve into the IMAQ functions. Looking for functionality akin to the 2010ImageDemo, essentially.

Cloned the git repository; learning SIP is next on our list. Having it in the toolbox also might provide an escape valve for situations where wrapping an entire C++ lib might be too much work, in which case we could just wrap customized code that implements only the functionality necessary.
Reply With Quote
  #8   Spotlight this post!  
Unread 05-25-2011, 09:10 PM
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 553
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
Re: RobotPy 2011.2

How do you debug with RobotPy?
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 09:13 AM.

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


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