So after *far* too much time spent on this, I am happy to announce the release of my WPILib Test Harness! For those who aren’t aware, WPILib is the name of the C++ library that FIRST gives to FIRST Robotics Teams to control the robots. The control system is a PowerPC running on a cRio platform designed and produced by National Instruments.
It had occurred to me towards the end of the build season this year that it was really annoying that I could only easily test code while our team was meeting, and of course I stay up late (as evidenced by this post time). So I wrote some stubs, but at some point I realized it would just be easier to make a giant stub for WPILib, since its just a set of classes with some hardware interfaces. It was extremely useful, and as I evolved it I was even able to find bugs in WPILib and the program for our bot.
At some point I decided to bring it in the direction that it is now, and I’ve spent the last week adding things and making the GUI a bit shinier. I’m pretty happy with the results so far, but theres a long way to go before every bot program will run under it. There’s a lot of things that do work, but there’s also a lot of things that don’t work.
All you need to do is get a copy of Visual Studio 2008 Express Edition, and install the wxWidgets GUI toolkit. Since I’m using wxWidgets for the GUI, I anticipate that it will get ported over to other platforms in the future as time (and need for it) allows.
- Run your unmodified robot code in ‘realtime’ (mostly) mode or step in 10ms intervals … unless the portions of WPILib you’re using aren’t supported, in which case something will need to be modified. 🙂
- Clickable and (hopefully) intuitive GUI interface
- Supports a joystick attached to your PC
- All driver station inputs (analog and digital), plus the LCD screen
- All PWM & Solenoid outputs
- All analog inputs (interrupts/advanced features not supported.. not well tested)
- Primary digital GPIO supported (interrupts not supported yet)
- Skinnable via XRC support
- Open source (GPL v3)
I found this program to be extremely useful, I hope you find it useful too! If you find any bugs (what bugs? there are no bugs 😉 ) or you have an improvement, please feel free to submit patches!
If there is enough community interest in this program, then I intend to create a publicly accessible SourceForge or Google Code project for it. The source code can be found at my FRC software resources page, and is released under the terms of GPLv3.
Here’s some screenshots:
Note: I am not directly associated with or sponsored by WPI, National Instruments, or FIRST (the national organization).