View Single Post
  #4   Spotlight this post!  
Unread 02-03-2004, 10:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: autonomous IR Navigation

The default navigate code:

- Waits for joystick button to be pushed
- Drives straight away from the back wall
- Locks the IR sensors centered facing forwards
- Turns the robot until the IR sensor locks onto the beacon
- Starts tracking with the IR sensor servos
- Drives the robot towards the beacon
- Stops robot when the IR sensors servos are at a particular angle.

These directives all occur in the navigate.c file. You can add your own code at the end where it says:
Code:
case AT_TARGET:
To run properly under autonomous you will have to at least modify the software in user_routines_fast.c (move the call to navigate(); up to User_Autonomous_Mode). The angle the sensor servos are at will depend on your robot and IR sensor mounting. Look in navigate.h at
Code:
#define LEFT_GOAL 135
#define RIGHT_GOAL 120
127 should be straight ahead, 120 is off to the side a little bit, 135 is of to the same side somewhat more. A reflection of how far apart the IR sensor servos are.
There are other parameters in navigate.h that you'll need to tweak to match your robot.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-03-2004 at 10:45.