Go to Post FIRST is the best thing I could have ever done. It shows me where I think my limits are, and it destroys them right in front of my eyes. My experiences with FIRST have defined who I am, and I am beyond blessed to have had them. - Audrey Chu [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-02-2011, 18:01
Jogo Jogo is offline
Registered User
FRC #0353 (Pobots)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2007
Location: NY
Posts: 83
Jogo is on a distinguished road
Field Centric Question

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.
  #2   Spotlight this post!  
Unread 28-02-2011, 19:55
bladetech932's Avatar
bladetech932 bladetech932 is offline
Programmer of awesome
AKA: Jon
FRC #0932 (Circuit Chargers)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Tulsa
Posts: 242
bladetech932 is on a distinguished road
Re: Field Centric Question

Both will work as long as you mean reverse both axis and not negate
__________________
Expect the best, Prepare for the worst
  #3   Spotlight this post!  
Unread 28-02-2011, 21:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,027
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Field Centric Question

Quote:
Originally Posted by bladetech932 View Post
Both will work as long as you mean reverse both axis and not negate
What do you mean by "reverse" both axes?


  #4   Spotlight this post!  
Unread 28-02-2011, 21:43
Skragnoth Skragnoth is online now
Registered User
AKA: Clayton
FRC #0133 (BERT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2000
Location: Standish, ME
Posts: 15
Skragnoth has a spectacular aura aboutSkragnoth has a spectacular aura about
Re: Field Centric Question

Our team does a 180 after placing the tube during autonomous, so that once teleop starts, the gyro is reset and we're good to go. However, this took a bit of time to tweak, and at this point, you probably don't have that luxury.
  #5   Spotlight this post!  
Unread 28-02-2011, 21:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,559
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Field Centric Question

I would change the one that does only affects field oriented operation, if you ever switch back to normal controls.
  #6   Spotlight this post!  
Unread 28-02-2011, 21:54
efoote868 efoote868 is online now
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,377
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!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi