Go to Post The only teams who have no chance of winning are those who believe they can't win. To quote the greatest athlete of our generation: "Limits like fears are often just an illusion." -- Michael Jordan - Karthik [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-01-2014, 14:29
dangyogi dangyogi is offline
Registered User
AKA: Bruce Frederiksen
FRC #4769 (Nerdvana)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2012
Location: United States
Posts: 1
dangyogi is an unknown quantity at this point
New "Easy Robot Language" (ERL) based on RobotPy

FRC Team 4769 has taken the Python interpreter from RobotPy and re-written what we needed so far from the WPILib in Python. We have Python wrappers for the NetworkCommunication and ChipObject C++ headers and have written everything else in Python (we call it RobotLib, to replace WPILib).

This uses Python generators for tasking, rather than OS threads so that there is no pre-emption; which greatly simplifies synchronization.

We have a web-based (run locally) erl_server.py that is our programming environment, something like RobotBuilder, but it generates complete robot.py files that you don't have to edit. This makes it a snap to make any changes. Our Ultimate Ascent code is 38 lines of code, with all of the object instantiation handled by the web server.

We also have a simulator (no graphics), that runs the same RobotLib code as what runs on the robot with the same generated robot.py file that you run on the robot.

Rather than network tables, all of our RobotLib objects log all data all of the time back to a client running on the PC. We store all of this data for the lifetime of the robot so that we can look back at it to get a better understanding of how our robot and drivers are performing. It also provides a real-time graphing dashboard while the robot is running.

This is open source on google code if anybody is interested. You'll need both the erl-builder and erl-frc repos.

There is much information on the wiki. We've run this on the competition FMS at an off-season match locally and plan to run it in the 2014 competition.

We have everything you need loaded onto a VirtualBox image if you want to play with it. (Ubuntu server, requires 256M of RAM). We were running this virtual machine under Windows at the local off-season competition. I don't think the people handling the competition had seen a team running a virtual machine before...

None of our students had any prior programming experience and this has made it much easier for them to get going on the programming. All the executable code is written in Python within the web server (the routines are short enough that you don't need fancy text editors).

If anybody is interested, I'd be happy to help you get up to speed on this.

-Bruce Frederiksen, software mentor, FRC Team 4769
Reply With Quote
 


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 06:22.

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