Go to Post If an alternate is used, all four teams are equal members of the alliance. (Trophies, trips, bling, book tours, custody of the children etc.) - Btower [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 09-01-2009, 20:32
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
PID robot heading--comments?

Okay, this is an idea that I've been thinking of over the past few days. Basically the problem is that obviously steering is going to be quite hard this year, specificlly in regard to the fact that to steer the robot effectivley one will likely have to make a lot of course corrections due to oversteering and the effect of the trailer behind the robot

My idea:Implement the steering control as a PID loop, where the ideal robot heading was determined by a joystick, and the actual heading was determined by a gyro mounted on the robot. Then use this to determine the offsets sent to the motors in order to turn the robot. Each time the PID calculation was run, the gyro would be zeroed.

The thing is, I'm not sure if this would actually hold water. Has anyone used a similar system, or does anyone have any advice about it?
__________________
Get yer robot source code here!
  #2   Spotlight this post!  
Unread 09-01-2009, 21:29
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: PID robot heading--comments?

I've had a similar idea of using a PID loop to control robot heading. I've been experimenting with the idea of PID Heading Control on our old 2008 robot, which seems to fair nicely. Though with the new wheels, I'm not sure how much effect a loop would have, but it could prove VERY useful if it can be used wisely.

It shall have to wait until tomorrow when I can play with a robot with the new wheels.

-Tanner
  #3   Spotlight this post!  
Unread 09-01-2009, 21:36
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: PID robot heading--comments?

Using the gyro is an ok idea, but keep in mind that your gyro will drift naturally over time (without vibration, ours was drifting about 1 deg/minute today in the shop).

Much worse than that however, is that if your robot gets hit hard (likely in this high-contact game) you'll briefly exceed the gyro's maximum speed which will mess up your current heading calculation.

We were thinking of something similar, but rather than aiming to point the robot at a certain absolute angle, have the X position of your joystick describe a desired turn rate in degrees per second, then have a PID loop attempt to achieve that.
  #4   Spotlight this post!  
Unread 09-01-2009, 22:45
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: PID robot heading--comments?

Quote:
Much worse than that however, is that if your robot gets hit hard (likely in this high-contact game) you'll briefly exceed the gyro's maximum speed which will mess up your current heading calculation.
Oh yeah...good point. I'll have to do some experiments to see how much of an issue this is
__________________
Get yer robot source code here!
  #5   Spotlight this post!  
Unread 10-01-2009, 04:35
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: PID robot heading--comments?

Use an Accelerometer to know if there was a sirious bump and use it to define what the robot will do in a bump. I'm sure the Accelerometer can detect bumps from diffrent angles and report them to the cRIO.
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
  #6   Spotlight this post!  
Unread 10-01-2009, 10:09
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,270
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: PID robot heading--comments?

Quote:
Originally Posted by Tanner View Post
Though with the new wheels, I'm not sure how much effect a loop would have, but it could prove VERY useful if it can be used wisely.

-Tanner
The loop should be just as effective with the new wheels, your gains will just be significantly different, for example if you are turning a large number of degrees with traditional wheels you can just slow the wheels and let friction stop you. However with the new wheels you may need to try to drive them in the opposite direction at the end of the turn to slow the robot quickly and avoid oscillation.

Another concern is that friction between the carpet around the outside and the wheel is much greater than the friction between the plastic and the wheel, this will likely cause less than desirable results if part of your robot is on the carpet.


-James
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #7   Spotlight this post!  
Unread 10-01-2009, 11:33
engunneer's Avatar
engunneer engunneer is offline
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 797
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: PID robot heading--comments?

Quote:
Originally Posted by JamesBrown View Post
Another concern is that friction between the carpet around the outside and the wheel is much greater than the friction between the plastic and the wheel, this will likely cause less than desirable results if part of your robot is on the carpet.
That's the whole point of using the PID. when you hit the carpet, and your equal motor speeds cause robot rotation, the gyro picks it up and corrects by slowing down the more frictionful wheels.

It is correct to say (as above) that you don't have to control the actual heading (called "position loop"), but you could instead control the rate of change of heading ("velocity loop").

many machine tools (milling machines, waterjets, etc) use two layers of PID. one position loop, and one velocity loop "inside" it.

The position loop says "I'm going to need to be here, so go this fast" to the servo amplifier (a fancy speed controller). The Amplifier then says "I need to be going this fast, so I should use this current" to decide what to send to the motor.

Since a First robot may not care about the absolute heading, the position loop can be left out.
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
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
Finding heading from camera. SL8 Programming 3 18-03-2008 21:29
Gyro Heading Correction in Operator Mode wkethman Programming 1 26-01-2008 15:25
Demo: Simple robot arm with a PID controller mtomczak Programming 1 17-01-2008 02:17
Keeping a certain heading using a gyro DanDon Programming 12 08-03-2006 14:27
Heading west? Andy Baker Rumor Mill 2 26-10-2001 02:50


All times are GMT -5. The time now is 09:30.

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