Go to Post The great thing about autonomous mode is that it doesn't require any additional effort from anyone else on your team... (You could do that yourself...but I've noticed that people will usually offer to do it for you, rather than let the programmer touch power tools.) - jgannon [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 31-01-2014, 19:17
mrklempae mrklempae is offline
Registered User
no team
 
Join Date: Jan 2013
Location: Montana
Posts: 19
mrklempae is an unknown quantity at this point
Porportional rotation using gyro

Hello,
I haven't been here in a while, but searching the forums didn't turn up anything relating to this topic. My team has been tying to correct for problems in our drivetrain (caused by uneven weight distribution and improperly mounted wheels) in programming while the build team tries to fix issues with the mechanical part, and everything we've tried has been relatively unsuccessful. What we have in mind is a system that would force the robot to keep at it's current angle of rotation (using the gyro) if the operator isn't currently trying to turn the robot. We've tried to use bang-bang style control (we knew this was a bad idea from the start) and take back half (which seems better suited for other purposes), and have yet to try PID. We reset the gyro and attempt to initiate our closed-loop control system every time we stop deliberately rotating. Does anyone have any suggestions for a proper way to do this (other than fixing the weight distribution and whatnot)? Thanks!

Last edited by mrklempae : 31-01-2014 at 19:23.
  #2   Spotlight this post!  
Unread 31-01-2014, 20:01
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Porportional rotation using gyro

The right way to do this is to fix the robot itself.

I would start by just trying proportional control. You don't actually need to use the PID controller class.

If you're using java/c++ with arcade drive, I'd do something like this to travel in a straight line.

drive.arcadeDrive(stick.getY(), kP*gyro.get()).

Make sure to have your code zero the gyro so that when the robot is on target, gyro.get() returns 0.
  #3   Spotlight this post!  
Unread 31-01-2014, 21:35
mrklempae mrklempae is offline
Registered User
no team
 
Join Date: Jan 2013
Location: Montana
Posts: 19
mrklempae is an unknown quantity at this point
Re: Porportional rotation using gyro

For some reason I edited out a few important details... It has a robot-centric mecanum drive train, which from what I hear, will probably never strafe perfectly straight without gyro intervention. We spent about an hour working on it today and (for the moment) are using a series basic statements to determine the rotation speed (which overshoots and is a bit jittery).

Last edited by mrklempae : 01-02-2014 at 10:07.
  #4   Spotlight this post!  
Unread 31-01-2014, 22:40
lcoreyl's Avatar
lcoreyl lcoreyl is offline
WittyTitleGen can't link to library
AKA: Milner
no team
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Colorado Springs
Posts: 201
lcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud of
Re: Porportional rotation using gyro

Quote:
Originally Posted by ekapalka View Post
For some reason I edited out a few important details... It has a robot-centric mecanum drive train, which from what I hear, will probably never strafe perfectly straight without gyro intervention. We spent about an hour working on it today and (for the moment) are using a series basic statements to determine the rotation speed (which overshoots and is a bit jittery).
emphasis mine


In my experience, we have had many a prototype drivetrain put together by newbies without any care given to weight distribution and very little care to how perfect a rectangle the frame is. It was just a visually all 4 wheels are on the ground, check. There was a good amount of care given to how well the rollers can spin when they were assembled and this is verified periodically. We've never tried to quantify the amount of deviation from expected travel, but I've never seen a robot deviate so much that we HAD to implement gyro control. We just did so to open the possibility for better driver control. I believe 2 years ago we didn't use a gyro during the competition at all...

so, check your rollers spin nice and smooth, and for big obvious mechanical problems (the wheel mounting? you mentioned, 1 gearbox assembled incorrectly, etc...), but if you are just trying to get a prototype drivetrain moving, you shouldn't need to spend a lot of time on weight distribution. You might post some video in the mechanical section and get some feedback from folks on that side.

As far as the gyro implementation goes, have you tried this?
  #5   Spotlight this post!  
Unread 31-01-2014, 22:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Porportional rotation using gyro

Quote:
Originally Posted by lcoreyl View Post
As far as the gyro implementation goes, have you tried this?
Here's a way of using a gyro with a mecanum (or other 3 DoF drive) which takes advantage of the strafing capability of the drive.

For skid-steer vehicles, here's another way to use a gyro.



Last edited by Ether : 31-01-2014 at 23:00.
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 02:38.

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