With the old IFI controls basic code and documentation was provided that mapped joysticks, buttons, and limit switches. This made it possible for teams with very limited programming resources get a basic robot up and running. Is there anything like that available for this years control system?
this years system comes with a default code that is ready to go if you just want straightforward arcade drive. It is very easy to use or slightly modify with Labview. If you just put the software on your computer, and follow the instructions in the rules for the benchtop test, then you should be set to go. But for your own sake, use an autonomous mode, or you will be hammered upon in autonomous.
We did the bench top test and can do the simple tank drive what we’re wondering if other functions are included in the default code for example is the trigger on joystick 1 mapped to a relay output by default. If so where do we find documentation?
the FRC documentation in c:\WindRiver\docs\extensions\WPILib should have it
that is for windriver though, honestly i have nothing against C code, but i would say labview should be much easier. Also, I believe when you update the code in the cRio to the default in LabView, it will change to Arcade drive. Anyways, in the Default code, just use the WPI Library at the bottom of the Functions Palette. It makes everything really simple. You can find relays under the actuators subgroup. In the WPI library, they have ready things like drive sytems and sensor subprograms. If you use this in conjunction with the manuals at The cRio manual page, you should be off to a good start. Much easier than any other years past.
No matter which way you go, its much easier than previous years. WPILib makes a lot of the really simple things really easy to do. I personally find the HTML version of the Doxygen documentation far easier to use, I have an updated version of the Doxygen docs posted at: http://www.virtualroadside.com/WPILib/index.html (click on ‘Classes’, it gives you a list of every class in WPILib, so you can examine the objects and their methods in detail).
For a concrete example of why things is far easier this year, consider the idea of having a servo always ‘pointing’ in the same direction
double angle = 360 - fabs(fmod(gyro.GetAngle(), 360));
if (angle > 180)
angle = angle - 180;
servo.SetAngle(angle);
Thats it. No annoying angle calculations, no integrating values for the gyro or figuring out the correct PWM signal to send to the servo – just GetAngle() and SetAngle().Of course, its not perfect since we were only experimenting to see how well the servo/gyro played together… but it took all of a minute to write that code. Far more effort would have been expended in previous years.
The Default Code does not include anything more than a simple 1 joystick arcade drive. Therefore any additional input you want from the driver station you will have to program yourself. LabVIEW is much easier, once you fully learn it (it was quite annoying in the beginning and I believe soon will be again) but in a nutshell WPILib provides much of the in depth functions and all you have to do is to put your input and your output (usually a subVI from WPILib) and run a wire from input to output. Keep in mind that’s a nutshell, it’s a tad bit more complicated than that.
LabVIEW vs. Windriver, I say LabVIEW only because, it’s interesting, I’ve never used graphical programming and FIRST is about making robots but also about learning to make robots and I would like to learn another type of programming method, LabVIEW is also used very commonly.
The Lead Programmer on my team and I have been resisting the temptation to switch to WindRiver. For some reason we like doing things the more complicated way (until you get sick of it). However, WPI has made it much easier to program this year as well through the use of numerous object classes in C++.
It’s a personal choice but try LabVIEW if too complicated then WindRiver.
There is a lot of documentation on FIRST’s->Already Involved:FRC -> Documents & Updates:2009 Control Sytem
Scroll down and there is a bunch of documents for LabVIEW and WindRiver
Good Luck!
Sravan