|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Announcing FIRSTLua
Hello, teams!
I would like to announce a project that we (Team 973) have been working on during the off-season: FIRSTLua. FIRSTLua is a fully functioning Lua interpreter that can be used for developing robot control code. Some advantages of using Lua:
This is beta-quality software: we have had success using Lua on our robot, but your mileage may vary. Examples and documentation are included. We are announcing this project now in the hopes that other teams will find it useful and will want to test it and contribute to it. By the time build season comes around, we'd like this to be a viable option for writing FIRST control code. Please help us out by reporting any bugs you find, and happy coding! Project Page: http://redmine.zombiezen.com/projects/firstlua README: http://redmine.zombiezen.com/project...try/README.txt Download: http://redmine.zombiezen.com/projects/firstlua/files FIRSTLua is released under an MIT Open Source License, as detailed in the README. |
|
#2
|
|||||
|
|||||
|
Re: Announcing FIRSTLua
We'll be running two different and unique robots in 1323's offseason in November running Lua to fully test it out.
|
|
#3
|
|||
|
|||
|
Re: Announcing FIRSTLua
What a great idea and great work putting it all together! Since you're using SWIG, given the work you've done so far, it will make life easier for people who want to try adding other scripting languages in the future (Python anyone?).
|
|
#4
|
||||
|
||||
|
Re: Announcing FIRSTLua
Quote:
Before settling on Lua, one of our first attempts was getting the Python 3 interpreter working. However, Python rather heavily depends on having Unicode strings, which vxWorks doesn't provide. Along with that and a multitude of other compiler and linker errors to sort out, we decided we didn't have the development time to get it done. It's certainly possible to get Python working (and I'd love to see it), but after evaluating the performance characteristics and necessary development time, we settled on Lua. We also found that Lua gives some flexibility that Python doesn't offer (though it pains me to admit it). Lua's core library is small, so it gives the team the option to pick what they need. Also, Lua's handling of modules is more favorable when trying to implement live code reloading (it can be done in Python, but it would be less straightforward). All of that aside, Lua is also designed to work on a smaller footprint than Python. The bulk of the code size when fully built is the WPILib wrapper (~20K lines of generated code), not Lua. None of this is to say teams shouldn't try to get Python working. I would love that. I just would like to warn everybody of some of the difficulties we ran into while trying to do it. |
|
#5
|
|||
|
|||
|
Re: Announcing FIRSTLua
If you are interested in working on getting Python working some time, let me know. I'd love to use Python for testing out algorithms. And nice work getting Lua to run!
|
|
#6
|
||||
|
||||
|
Re: Announcing FIRSTLua
Amazing idea! I hope it goes well.
Last edited by Dustin Shadbolt : 19-10-2010 at 15:58. |
|
#7
|
||||
|
||||
|
Re: Announcing FIRSTLua
YES! Now I have an excuse to learn Lua!
|
|
#8
|
||||
|
||||
|
Re: Announcing FIRSTLua
Quote:
Regardless, Lua is also an interpreted language that will open up programming to a much broader audience than C++/Java Universities teach Computer Science freshmen interpreted Languages (Scheme, Python) with great success. |
|
#9
|
||||
|
||||
|
Re: Announcing FIRSTLua
Can this interpreter be adapted to use perl grammar?
|
|
#10
|
|||
|
|||
|
Re: Announcing FIRSTLua
Oh man, our team is a mess... I think I will be the only full time competent programmer in our team. I would have to teach rest of the programmers. One guys didn't know C++ had classes -__- I know, thats pretty bad. I been talking about off season work ever since the end of the competition, it never happened, especially me working on the autonomous mode of the robot. So I also had the plan of creating a LUA interpretor for the robot, but you guys did it for me, thank you, I am not sure if I would be using it but thank you in advance and I will give you credit if I ever use it
|
|
#11
|
||||
|
||||
|
Re: Announcing FIRSTLua
No, not directly. The interpreter being used is just a patched version of off-the-shelf Lua; you would have to get Perl working from scratch. I haven't looked at the Perl codebase too extensively, but it looks like it would be an effort.
The only thing that may be of use from here (if you were determined) is the SWIG interface file that I assembled from the WPILib headers. |
|
#12
|
|||
|
|||
|
Re: Announcing FIRSTLua
Quote:
Not yet ready for prime time like your Lua port is, but I wanted to let folks know I've got it at least minimally running. I'll make another announcement when I've got WPILib-using code running and it's ready for other people to really experiment with. Git repo at: http://git.tortall.net/cgit.cgi/RobotPy.git/ I recommend TortoiseGit for getting a copy on Windows. On another note: you may want to rename your project to not use the FIRST name. FIRST recently became more sensitive about such things as they've trademarked the "FIRST" name and thus have to protect it from dilution. I named my Python port "RobotPy" for this reason; you might want to rename yours to "RobotLua" or something similar. Last edited by Peter Johnson : 24-10-2010 at 01:08. Reason: Add note about TortoiseGit |
|
#13
|
|||
|
|||
|
Re: Announcing FIRSTLua
Thanks a bunch for doing this! I'm very excited! While I don't have access to a robot to try to help right now, I'd love to help test it and fix it up. Unfortunately, I'm probably booked until the semester ends. Please keep me/us updated.
|
|
#14
|
||||
|
||||
|
Re: Announcing FIRSTLua
Python? <3
I can finally teach the freshmen how to do more with less. see http://teddziuba.com/2010/10/taco-bell-programming.html |
|
#15
|
||||
|
||||
|
Re: Announcing FIRSTLua
sorry for the double-post, but I can't get it compile.
it spat out this: Code:
MainRobot.cpp:28:20: Python.h: No such file or directory MainRobot.cpp: In member function `virtual void PyRobot::StartCompetition()': MainRobot.cpp:75: error: `Py_SetPythonHome' undeclared (first use this function) MainRobot.cpp:75: error: (Each undeclared identifier is reported only once for each function it appears in.) MainRobot.cpp:76: error: `Py_Initialize' undeclared (first use this function) MainRobot.cpp:79: error: `PyRun_SimpleFile' undeclared (first use this function) MainRobot.cpp:86: error: `Py_Finalize' undeclared (first use this function) make: *** [PPC603gnu_DEBUG/MainRobot.o] Error 1 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Announcing Project Falafel/FLFL | RandomStyuff | General Forum | 0 | 28-08-2010 07:53 |
| Announcing of Penalties | ShaniL | Rules/Strategy | 3 | 16-03-2009 21:27 |
| Announcing penalties | GaryVoshol | General Forum | 8 | 11-03-2008 16:47 |
| Announcing BattleCry@WPI 8! | WernerNYK | Off-Season Events | 90 | 28-08-2007 13:03 |
| Announcing Brunswick Eruption V3.0 | Mike Schroeder | Off-Season Events | 2 | 26-05-2004 23:12 |