Go to Post FIRST is not a party. It is the most important activity a high school age student can do. - JohnBoucher [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 24-01-2007, 19:03
Jared Russell's Avatar
Jared Russell Jared Russell is online now
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,070
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.
 


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 22:03.

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