Log in

View Full Version : WPILib - Library for robot programming


BradAMiller
15-01-2006, 15:36
I've put up a copy of WPILib if anyone is interested in playing with it.

WPIlib is a library that was originally developed for some high school robotics courses that I taught a few years ago using the EDU/Robovation controller to make life a little easier. Since then it has been ported to the FRC controller for 2006 and the 2004-05 controllers.

It is the base runtime system used by EasyC for FRC. If you would like the ease of use that EasyC has, but want to use MPLab or Eclipse as the development environment, you might give it a try.

I posted it on my web site at WPI (http://www.wpi.edu/~bamiller) along with a page of examples. For each of the examples there is an MPLab project that is also downloadable.

The whole thing should be installed in C:WPILib for the links in the examples to work and I would suggest doing that anyway so that if the library is updated, it can be replaced in one place and all projects that point to it will get the new version.

It includes support for all the kit sensors including the camera, gyro, accelerometer, and gear tooth sensor. It also supports the Daventech/Radio Shack ultrasonic rangefinders, and the Daventech digital compass.

There is a substantial document that describes how to use it and how it works also on the web site - although due to some bug in acrobat or the thing that created it, you have to download the file first then view it locally.

There are currently versions of the library for 2004-2006 FRC controllers. The documentation talks about VEX, but in the scramble to get it working, the VEX/Robovation code didn't get updated. Eventually I'll put up versions that support those controllers.

Tom Bottiglieri
15-01-2006, 15:49
First of all, I would like to calmly say:

OMG THIS ROCKS!!! AHHH!!!!! dfjlhadsfkjh!!!! <33

Mhmm.. excuse me..

Is there any info on the main program loop used in your library? (mean execution time, resources used.. etc..)

BradAMiller
15-01-2006, 16:07
Is there any info on the main program loop used in your library? (mean execution time, resources used.. etc..)
The traditional program loop is buried in the library. Timer 1 runs continously at 1ms intervals. Each interrupt it checks if there is master data that needs to be exchanged with the user processor and does it in the background. So there is no getdata/putdata that is exposed to the "user" program.

I will say that the overhead of the interrupt service routines are pretty high - about 54us of time to save and restore the context because of the need to save the mathdata and tempdata sections in the interrupt handler. But in spite of that, it seems to be able to handle the camera and gear-tooth sensors running at the same time.

Jon236
17-01-2006, 21:43
In your OI functions, I am assuming the first argument 'port' is 1-4. Is the second argument 'function' then 'p1_y' or a similar variable?


Jon Mittelman

SMGraham
01-06-2006, 15:17
WPIlib is a library that was originally developed for some high school robotics courses that I taught a few years ago using the EDU/Robovation controller to make life a little easier.

I teach a robotics course to Mechanical Engineers at the Naval Academy that is based on the EDU-Robitics kit. Most ME students do not know how to program, and since MPLAB is not particularly user-friendly for novices, I am looking for a programming environment that provides more help with correcting syntax errors. I am considering Easy-C, but was told by Intellitek Educational Tech support that the EDU Mini-controller is not supported by Easy-C. They suggested I go through this forum to find out if anyone has used Easy-C with the EDU controller. What is required, and do you know if anyone has done it?

EHaskins
18-06-2006, 14:02
Is the source code available?

intellec7
20-06-2006, 22:45
To my understanding, due to the agreement between Intelitek and WPI, the source code is not available

BradAMiller
21-06-2006, 03:12
Is the source code available?
It is true, that I can't give out the source code as was said due to an agreement with Intelitek since it is also used in their EasyC product.