|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
Re: New "Easy Robot Language" (ERL) based on RobotPy
This sounds like this has a lot of interesting ideas in it. Cool.
|
|
#3
|
||||
|
||||
|
Re: New "Easy Robot Language" (ERL) based on RobotPy
... except, where's the code? I can't seem to find it.
|
|
#4
|
||||
|
||||
|
Re: New "Easy Robot Language" (ERL) based on RobotPy
Oh, interesting. Didn't realize that google code projects could have multiple repositories. The default repository shows your java code from a previous year.
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|