A serious (FATAL) error in the FRC documentation (competition_mode)

at the buckeye regional I discovered a bug in our code, and sat up half the night in my hotel room looking at it. I finally concluded my code MUST be correct and the documentation must be wrong

testing in the pit the next day confirmed the documenation is wrong.

Im talking about the bit that tells you if the robot is disabled (before the match starts) or enabled: competition_mode

the documenation from IFI says :

Competition Mode Bit 7 of rc_mode_byte (aliased as competition_mode below) indicates the status of the Competition Control, either Enabled or Disabled. This indicates the starting and stopping of rounds at the competitions. Competition Mode is indicated by a solid “Disabled” LED on the Operator Interface.
When Disabled, all PWM and Relay outputs are disabled, but program execution continues. competition_mode = 1 for Enabled, 0 for Disabled. (copied from the FRC 2004 Reference Guide)

in actual testing when the robot is enabled this bit is 0 - when disabled its 1

there was a post by “Wizard of Az” talking about this, but he only seemed to indicate that the name of the variable was confusing - he did correctly state that 1=disabled, but did not mention that the documentation IS WRONG.

we use a yaw rate sensor and to detemine the zero reading we average the input over 32 SW loops when disabled, and continue to do so as long as we are disabled. The only thing that kept our code working was the fact that autom mode is a while loop, so our averaging code was not running during auton mode

but it was running when the driver closed the loop on the yaw rate sensor in normal driver mode - our driver had been complaining that it didnt seem to be working right, but I thought he just wasnt use to it. We had done the original testing with the zero point hard coded = 141, and added the averaging while disabled code later.

If anyone is using the competition_mode bit to initailze variables or start timers or initailze state machines before the bot is enabled, go back and check your code - this SW documentation error caused me hours of grief (trying to figure out why my code was changing the gyro zeropoint while the bot was enabled - we output the zero average to the user_mode display on the OI - so I could see something was rotten in Cleveland :^)

That would explain why a home made competition port controller another team let us borrow was labeled incorrectly. The one we made, we labeled after testing.

This seems to be a common mixup, i have already seen a couple of posts on CD with someone mixing up wether 0 and 1 are on/off pressed/not pressed high/low etc…

no the competiton PORT adapters are documented correctly as far as I know - its the bit that is defined in the SW code that is backwards.

well i dont remember what the documentation says exactly, but i was assuming that all it said was that shorting pin x and y sets “competition_mode” to 1 or 0. Whatever, it doesnt really matter.

Does anyone have any idea who or what writes the IFI code and documentation. Is it employees or FIRST volunteers? how directly is FIRST involved? when did they start work on this years default code? Just curious…

who or what?! thats funny! :ahh: might explain things

innovation FIRST is a separate company that sells equipment for robot hobbiest and folks like us

Im sure FIRST is probabally their biggest customer (1000 teams get new equipment every year now) - so Im sure they are very interested in what FIRST has to say about their gear.

All in all I give innovationFirst ten green squares up - I think they do an excellent job - I dont want anyone to think Im upset or angry about this error in the documentation

in fact, its a normal part of engineering - every once in a while you catch an error in a spec sheet, or a compiler that generates wrong code, or a microprocessor that does not do what its suppose to under certain conditions

in engineering, these sorts of things are documented in whats called ‘errata sheets’ - Ive never seen a supplier yet that didnt have a bunch of them.

Does anyone other than FIRST actually buy this stuff? It is pretty good quality and all, but $565 is pretty steep for microcontrollers (the two inside the FRC cost a grand total of $13.70). I was assuming that the reason it costs so much is because its tailored to exactly FIRST’s needs and therefore not exactly the best choice for other uses.

Apparently, this stuff is only available to FIRST teams and schools so it isnt just equipment for the robot hobbiest.

My knowledge on the controllers (which may or may not be accurate)…

Back in the day (1998 and earlier I think :rolleyes: )… Eric Rasmussen used to design the controllers. I believe he works for Deka, but is also a FIRST volunteer. The contollers were basicly given to you in a project box and you had to send them back to FIRST when the season was over. There was no such thing as relays, all the motors used hobby style Teken speed controllers. Programming was accomplished via a Basic Stamp.

Basicly some X-mililtary type people decided to start Innovation FIRST. You’ll also notice that they design rack mount enclosures. Innovation FIRST gave us the control system we use today. Robot enthusuats drool over the stuff they make. I believe some Battlebot competitors use their stuff as well. Innovation FIRST has really done an amazing job with the control system.

… enough rambling :cool:

EDIT:
Correction: Eric works for FIRST. Thanks John.

someone asked me how to tell if this documentation error is an issue for their team - best way to check is have your SW guys search your code for “competition_mode” and see if anyone used it for anything - if not you are ok - if they did use it to initialize stuff then, yes, if they went by the programmers manual it will do the opposite of what you would expect - so if you find an

If (competition_mode… statement in your code, check it carefully

you programmers may have already discovered that the documentation is backwards - so dont blindly change it

just make sure its correct:

competition_mode=0 when the robot is enabled

competition_mode=1 when the robot is disabled

BTW - innovationFirst will sell their products to anyone - for most equipment like this, the sell price is about 7 times what it costs to manufacture each unit.

thats because there is a lot of engineering design, development, field testing, field support, warrenty coverage on a low volume product like this - if you tried to build one yourself from scratch, then write your own SW to make it run, it would end up costing you hundreds of thousands of $$$ in engineering development, and would take at least 4 months to get the first prototype up and running.

Eric works for FIRST.

http://www.innovationfirst.com/FIRSTRobotics/rc.htm

Says “(Schools and FIRST teams only)” about the FRC and the whole package.

max - you are turning me into a lawyer :cO

it says (in context)

Includes the Microchip C Compiler (Schools and FIRST teams only)

microchip struck a dealt to let us use their C compiler, which is normally somewhat expensive. InnovationFIRST does not require proof of being a school or first team before they ship stuff to you - believe me - they would be HAPPY to sell their stuff to anyone who wants it - this is how they make a living.

Ive had victors sent to my name at my home, just so they wouldnt get lost in the our sponsors factory.

IFI Hobbiest equiptment
IFI First Robotics Equiptment

The equiptment that we all know as the controllers and various items that comes from ifi is designed by ifi employees such as Ricky and Corey. I know that there are a few of the ifi guys that are mainly hardware and then some that are mainly software. If anyone was at ucf or nyc one of your ifi reps at the event was Corey, he helped design part of the current rc and also is one of the main guys (with ricky) who designed the new LED units. If you were at the NJ or UTC Regional then one of your ifi event reps was Ricky, he also worked on the rc and led units. As you can see from this, most (if not all) of the technology that is used as in the rc, oi, led units, modems, victors and spikes among other things are mainly designed by IFI guys but are produced by another company due to them not being a “production company”. So if you ever see any of the IFI guys at an event give them a thank you, because i personally think that FIRST would not be FIRST as we know it with out them all.

ah, sorry, i just misunderstood it. Thanks.

A bit of a more in depth explanatioin (I think this is going to date me…), I know for a fact that the Eric-designed control system was used at least from 1997 to 1999 (I believe that was the only time period it was used; there was something else before that). The control system did have relay outputs but they were physically part of the robot controller (there was a positive lead and a negative lead on the robot controller that you connected to). Originally, variable speed applications were used with Tekin speed controllers. Unfortunately, the Tekins had a tendency to catch on fire when too high of a current was used. In 1999, Innovation FIRST came out with the Victor 883 speed controller which was used for high current applications (at the time, it was required on drill and fisher price motors and other motors could use the Tekins). The Eric-designed Robot Controller needed to be returned to FIRST after the season (you could pay a deposit and keep it until October if you wished).

I don’t remember ever hearing that the IFI guys were ex-military (they maybe). I had heard that they were FIRST graduates but that’s just hearsay.

Matt

Matt, you’re bringing it all back to me. Yeah, I do remember the relays existing and located in the RC. I used to ask the electrical engineer on my old team (175, Buzz), Rich DesJean, about putting the high powered relays with the low powered control electronics all the time.

I remember when there was the requirement to use the Victor 883s instead of the Tekins as well.

Rich DesJean actually designed a control system using hobby radios and such that you could use when you had to return the FIRST one, which he then made into a whitepaper. Our sponsor, Hamilton Sundstrand SSI, Hamilton Standard SSI at the time printed many copies of the spiral bound white paper and distributed them at our regionals.

Ahh… the memories. I started FIRST when I was a Sophomore in high school which was back in 1999.

I cannot even IMAGINE that Bob or Tony were ever in the military.

As far as I know Tony and Bob are ony ex-military in the sense that they are ex-Military-Industrial Complex guys.

They used to be with Raytheon and I think they worked on Military stuff. In fact, the “883” part of the Victor 883 name is a reference to a Mil-spec of some kind (I think it is a test proceedure).

Joe J.

Joe, that solves it. They weren’t actually in the military but worked for companies who designed hardware that had to be specd for the military. I found a webpage that links to PDFs that describe the 883 specification, which are really test procedures. I’ve also found that it’s very common for companies to incorporate 883 in some way if any of the MIL-STD-883 procedures were followed in the creation of the device.

MIL-STD-883