Go to Post There can be only one.... - Koko Ed [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 24-01-2007, 18:47
chaoticprout's Avatar
chaoticprout chaoticprout is offline
can't wait for next years VRC
AKA: Michael Montazeri
FRC #1138 (Eagle Engineering)
Team Role: Alumni
 
Join Date: Nov 2004
Rookie Year: 2005
Location: West Hills, CA
Posts: 265
chaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant future
Send a message via AIM to chaoticprout Send a message via MSN to chaoticprout
Field oriented holonomic code?

Hey, I was wondering where a good place to look for help with making field oriented holonomic code. Thanks a ton.
__________________
2009 Los Angeles Regional - Chairman's Award
2009 Granite State Regional - Engineering Inspiration Award
2007 Los Angeles Regional - Engineering Inspiration Award
2006 Southern California Regional - Regional Champions
  #2   Spotlight this post!  
Unread 24-01-2007, 19:03
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,078
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: Field oriented holonomic code?

I assume by this you mean a holonomic drive where forwards on the stick means that your robot moves forwards no matter what the bot's orientation.

The first thing you need is normal holonomic code. You probably want it to be closed-loop (i.e. velocity feedback control). There are plenty of other threads on that here.

The next thing you need is a gyro to get the robot heading. Kevin Watson's gyro code is well written, and a good jumping off point.

Note that since the gyro measures angular velocity - not displacement - you must integrate its output (i.e. sum the velocities and divide by time) to get your orientation. This is the biggest hurdle for true orientation-independent holonomic code: your gyro will drift by a little bit, especially once you start bumping into things. I've seen other teams with omni/mecanum drives give the driver a button to reset the gyro heading to 0 when the drift gets bad enough.

You could try to use an electric compass as well, but these are more expensive, slower to respond, and shouldn't be used near magnets - like electric motor.

Once you have your robot heading, things are easy. Get out a piece of paper and figure out the trig - take the forward (in the robot coordinate system) and left/right translation (in the robot c.s.) commands, and multiply them by the sine and cosine of the heading angle (which one goes to which depends on which direction the gyro thinks is positive). Leave the yaw command untouched. This correctly moves your robot in a straight path regardless of orientation.

Like I said, be mindful of gyro drift, and you will most likely need a tight feedback loop on the drive motors, but it has and can be done.
  #3   Spotlight this post!  
Unread 24-01-2007, 19:22
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,508
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: Field oriented holonomic code?

Quote:
Originally Posted by Abwehr View Post
I assume by this you mean a holonomic drive where forwards on the stick means that your robot moves forwards no matter what the bot's orientation.

The first thing you need is normal holonomic code. You probably want it to be closed-loop (i.e. velocity feedback control). There are plenty of other threads on that here.

The next thing you need is a gyro to get the robot heading. Kevin Watson's gyro code is well written, and a good jumping off point.

Note that since the gyro measures angular velocity - not displacement - you must integrate its output (i.e. sum the velocities and divide by time) to get your orientation. This is the biggest hurdle for true orientation-independent holonomic code: your gyro will drift by a little bit, especially once you start bumping into things. I've seen other teams with omni/mecanum drives give the driver a button to reset the gyro heading to 0 when the drift gets bad enough.

You could try to use an electric compass as well, but these are more expensive, slower to respond, and shouldn't be used near magnets - like electric motor.

Once you have your robot heading, things are easy. Get out a piece of paper and figure out the trig - take the forward (in the robot coordinate system) and left/right translation (in the robot c.s.) commands, and multiply them by the sine and cosine of the heading angle (which one goes to which depends on which direction the gyro thinks is positive). Leave the yaw command untouched. This correctly moves your robot in a straight path regardless of orientation.

Like I said, be mindful of gyro drift, and you will most likely need a tight feedback loop on the drive motors, but it has and can be done.
Also, gyros need to be hard mounted to the frame. If they are ziptied or other loose mount they will be innacruate.

Also, check the angular turning speed of the gyro. Some can't do more than 180 degrees a second (or some other number, I forgot the exact one) and aren't suitable for this use as any fast turns can throw them off.
  #4   Spotlight this post!  
Unread 24-01-2007, 20:33
chaoticprout's Avatar
chaoticprout chaoticprout is offline
can't wait for next years VRC
AKA: Michael Montazeri
FRC #1138 (Eagle Engineering)
Team Role: Alumni
 
Join Date: Nov 2004
Rookie Year: 2005
Location: West Hills, CA
Posts: 265
chaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant future
Send a message via AIM to chaoticprout Send a message via MSN to chaoticprout
Re: Field oriented holonomic code?

Thanks for the replies, they helped a lot.
__________________
2009 Los Angeles Regional - Chairman's Award
2009 Granite State Regional - Engineering Inspiration Award
2007 Los Angeles Regional - Engineering Inspiration Award
2006 Southern California Regional - Regional Champions
  #5   Spotlight this post!  
Unread 24-01-2007, 23:09
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Field oriented holonomic code?

This ones pretty easy..

Code the robot so the frame moves in vectors relative to the base. (Velocity and direction)
Determine the input vector (trig)
Subtract the difference in direction (heading of robot - direction of input vector)
Do it.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Impossible to truly to vex holonomic with default code? chaoticprout FIRST Tech Challenge 3 08-05-2006 20:40
Holonomic Drive Question Jeff Waegelin Technical Discussion 12 20-11-2005 21:23
Holonomic... Greg Perkins Technical Discussion 2 02-02-2005 11:59
holonomic drives Max Lobovsky Technical Discussion 5 10-03-2004 21:31
Science Oriented Book Recommendations Kristina Math and Science 9 19-04-2003 02:22


All times are GMT -5. The time now is 21:53.

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