View Single Post
  #6   Spotlight this post!  
Unread 28-02-2011, 21:54
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,406
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Field Centric Question

Quote:
Originally Posted by Jogo View Post
Our team used field centric control this year. However, because the robot starts facing the driver, the gyro's zero position is skewed by 180 degrees.

As the robot is shipped and I don't have a mecanum test environment anymore, I'm trying to convince myself of how this can be resolved.

1) always add 180 to the gyro angle before using it
2) negate both joystick axes (this is the one I'm particularly interested in)

Are both of these solutions valid, and equivalent?

Thanks for your help. This is probably a really simple question, I'm just having trouble visualizing it.
From experience, having an offset angle in the code along with a comment why its there is much more helpful to people (including yourself in a week after you put it there) then seemingly randomly messing with joystick axes / wheel outputs.
Also, if you ever have the robot start in a different orientation, changing an angle is much more convenient than changing your joystick input, especially if its an awkward angle like 45 degrees.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!