Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   Getting started with Commands in Python (http://www.chiefdelphi.com/forums/showthread.php?t=126220)

Waz 10-02-2014 21:40

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

virtuald 11-02-2014 22:25

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.

MrTimKlein 27-01-2015 16:26

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.

virtuald 27-01-2015 16:33

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.


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

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