View Single Post
  #1   Spotlight this post!  
Unread 14-03-2005, 13:48
Tom Saxton's Avatar
Tom Saxton Tom Saxton is offline
Registered User
no team (Issaquah Robotics Society)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2003
Location: Sammamish, WA
Posts: 98
Tom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud of
Setting Autonomous Settings from OI

Does anyone understand the details of how values from the OI are sent to the RC prior to and during autonomous?

Last year, we had our autonomous settings on the robot, and that was a big pain. At the end of the regional, we realized that were getting readings from the OI before and during autonomous, so we could move those switches and controls to the OI and just make sure they are set correctly before the match starts. (Obviously, we can't touch them during autonomous.)

This year, we have a custom control box on the OI with various LEDs, switches and one potentiometer, all running through the various ports and carefully laid out so as not to conflict with the pins that are duplicated on multiple ports.

Everything works great during tele-operation, and even when we're disabled via the competition port. However, during autonomous, some switches don't work. We have one switch (hooked into p1_sw_trig) that controls whether or not our blinking light decorations are enabled; it works great at all times except during autonomous.

Some other switches seemed to be having similar problems, so we changed our code to capture the switch values while disabled, then stop updating the values once autonomous starts.

Our main autonomous mode is determined by the value of a potentiometer hooked up to p1_x. Most of the time, this one works great, but sometimes it doesn't. Instead it will get "stuck" on an old value. The pot has detents, so there's no problem with finding the right position, and there's plenty of difference between positions. Also, it's not like the values drifted and we get a value near the setting we expect, instead we get a fixed value that doesn't change no matter where we turn the knob. When this has happened, the only reliable way to cure it is to reset both the OI and RC using the buttons on the OI.

Our procedure is to put the robot in manual and disabled, then switch to autonomous, then enable. We know that we don't get into the autonomous branch of the code until we are in both autonomous and enabled. Even if we capture the values before the "autonomous_mode" becomes true, we still get values that are always wrong on some switches and sometimes wrong on the pot.

Has anyone else seen this issue? Obviously, it's pretty embarrassing when your robot runs the wrong autonomous mode in front of five other teams and a large perceptive audience!
__________________
Tom Saxton
http://www.idleloop.com/