Go to Post Inspiration and recognition does not equal "advanced shop class". What's better for your team is not better for all teams. Remember that. - DonRotolo [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 10-02-2014, 21:40
Waz Waz is offline
Strategy and programming mentor
AKA: Steve
FRC #2357 (System Meltdown)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Raymore, MO
Posts: 12
Waz is an unknown quantity at this point
Getting started with Commands in Python

I have been scouring the web (including most all the links from this forum) for a sample of using wpilib Commands with RobotPy and have been unsuccessful. There are a number of tutorials on Commands out there if you are using C++ or Java but we (team 4561) are using Python and RobotPy.

Does anyone have a good example to share?

Or, is this even possible? The list of available classes for RobotPy here (http://firstforge.wpi.edu/sf/wiki/do...py/wiki/WPILib) does not list Command, Subsystem, Scheduler and related classes. But, I get the feeling that list is a bit dated.

Steve Wasleski
Mentor - Team 4561
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2014, 22:25
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,040
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Getting started with Commands in Python

Hey Steve,

I believe all of the commands stuff has been wrapped in Python. However, I'm not aware of anyone who is actually using it. Using it should be pretty straightforward -- the object names and function names are the same as the C++ library that it wraps. I think Peter had added some useful things for the Preferences class, but I don't know much about that.

Unfortunately, the robot simulator / wpilib in pyfrc does not currently support commands.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2015, 16:26
MrTimKlein's Avatar
MrTimKlein MrTimKlein is offline
Mentor - Programming, Electronics
AKA: Tim Klein
FRC #3966 (STEMpunks)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Knoxville, TN USA
Posts: 7
MrTimKlein is an unknown quantity at this point
Re: Getting started with Commands in Python

We are also struggling with command code. I'll speak with my programmers tonight and see if we can generate a concise, reproducible error.

Waz, feel free to message me or robobenklein on this if you want to take it offline.
__________________
Mr Tim Klein
Lead/Code Mentor
FRC Team 3966 L&N STEMpunks
Knoxville, TN
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2015, 16:33
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,040
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Getting started with Commands in Python

Hey Tim,

This thread was from 2014, so the information is out of date.

The command stuff is 100% python this year, and should work without too many problems. I've gotten the pacgoat/GearsBot examples working in the 3D simulator. Unfortunately, nobody has stepped up to port the unit tests from java to python, so it's possible (probable) that there are bugs in the implementation.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
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 19:54.

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