View Single Post
  #30   Spotlight this post!  
Unread 17-03-2010, 15:08
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,081
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: fine control of robot with mecanum wheels

Quote:
Originally Posted by Ether View Post
Weight distribution! Yes, I can see where that might be a factor with our design.

Gyro. Interesting. How difficult was this to implement (develop and tune the algorithm)? Did you have success using gyro without closed-loop wheelspeed control?

Thanks!


~
Using the gyro was very simple - the algorithm was just:

Code:
for each motor
  motorCommand = <result of holonomic drive calculations>;
  if we are trying to go straight (e.g. yaw command is zero)
    motorCommand += Kp * getGyroRate();
  end if
  Tell motor to go "motorCommand"
end for
As you can see, we didn't need encoders for this to work well for us. We determined "Kp" by having it read from a potentiometer (the throttle on our joystick) - we played with it until it seemed like there was a good balance between staying straight and being smooth (if Kp is too high, the robot will oscillate wildly). You can also use integral or derivative terms (e.g. PI, PD, or PID) in your controller if you aren't satisfied that this is fixing things for you.

We put encoders on our drive, but ended up only using them for distance tracking in autonomous mode rather than for velocity control (the gyro by itself was fine and was 4 less things that could fail).