View Single Post
  #2   Spotlight this post!  
Unread 03-11-2011, 00:16
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: Python Compatibility

Quote:
Originally Posted by WillF View Post
So I'm looking at using Python in my team this next season and I have a couple of questions for those of you that used it (with success or failure). I am planning on using Ubuntu 11.04 as my development machine first off. Will this work? How does file transference work?
Yes, it will work. FTP is used to copy files to the robot, which of course is available on Unix (you can also use the provided upload script -- written in Python -- to do it for you). You'll need an equivalent to NetConsole for debugging purposes--"nc" (aka netcat) should work for this, but if not, it should be pretty easy to implement an equivalent in Python. Basically it's just sending/receiving UDP packets of text to port 6666.

Note the Python version installed on the robot is Python 3; while not strictly required, you may find it useful to have Python 3 installed on Ubuntu as well.

There's no equivalent to the driver station available for Unix yet. The protocol's been pretty completely reverse engineered--there's even a basic start to a driver station in the RobotPy repository (https://github.com/robotpy/robotpy/tree/2011/sim/dspy) but it just does basic enable/disable, no joystick support or the like. It should be a straightforward project to enhance this with something like pygame to add the necessary joystick support.

It's rather difficult to develop C++ robot code on Unix. I've heard it's possible but never done it myself--Wind River Workbench isn't available, and you'll need your own GCC cross-compiler hosted on Unix.
__________________
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