Go to Post Engineering fundamentally comes down to problem solving, and if the students can't get excited and inspired by the problem solving process because someone has spoon fed them a solution, then nobody wins. Give a man a fish, he'll eat for a day. Teach a man to fish, he'll eat for a lifetime. - kevinw [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 07-02-2006, 23:54
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Robot doesn't drive straight

Our robot has a 2 speed transmission. 2 CIMs turn the wheels on the left side (1 engages in low-speed, 1 engages in high-speed), and 2 CIMs turn the wheels on the right side (1 engages in low-speed, 1 engages in high-speed).

1) While in high-speed, when maximum voltage is supplied to the motors on both sides, the robot veers slightly to the left.
2) Still in high speed, if we set the motors back to neutral, the robot stops, and then it turns slightly to the left (the right wheels have a little extra turn at the end).
3) In low speed, when maximum voltage is supplied to the motors on both sides, the robot veers greatly to the left. With testing, we needed to apply about 60% less voltage to the right wheels just to get the bot to head on a somewhat straight path.

I am not sure, but I think my the solution to my problem lies within the calibration settings on the Victor. If this actually is the problem, what would I specifically need to do? If the solutions is something else, what is it?
  #2   Spotlight this post!  
Unread 07-02-2006, 23:57
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: Robot doesn't drive straight

Check the trims on your joysticks.

I HATE those things!
  #3   Spotlight this post!  
Unread 08-02-2006, 00:01
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Re: Robot doesn't drive straight

Ah I probably should have mentioned... the PWM output values are hard-coded. I am working on autonomous mode.

This would lead me to believe that there is a hardware problem somewhere between the RC, Victors, and motors.
  #4   Spotlight this post!  
Unread 08-02-2006, 00:29
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,302
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Robot doesn't drive straight

We've run into a similar problem; when runnning forward, the left side of our robot started before the right side, and we believe attained a higher speed. The same problem occurred in reverse, only with the sides switched. I'm thinking their is either a problem with the victors' calibration or that the CIMs have some kind of motor bias (this could have to do with the fact that motors on opposite sides spin opposite directions to drive the robot the same direction). Is there any way to correct this through hardware, since we believe we already know a few potential software fixes?
  #5   Spotlight this post!  
Unread 08-02-2006, 00:35
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,516
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Robot doesn't drive straight

First, ditch those right handed kit-provided joysticks if you are using them. Second, calibrate the Victors with some other joysticks (preferable the old CH flightsticks). Third, perhaps try making your program such that the maximum PWM value is attained before the joystick reaches full travel. Fourth, check for binding, friction, and misalignment in your drive system. Noise/sound is often a good indicator.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #6   Spotlight this post!  
Unread 08-02-2006, 00:40
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Robot doesn't drive straight

definately reset the victor calibration if its off by 40%. The proceedure is simple, you push the little recessed button until the LED blinks, then you apply full forward, full reverse, then back to neutral. The exact sequence is in the manual - best to look it up and get it right the first time.

Its also possible your drive train on one side is not spinning freely. One way to check this is with a clamp-on amp meter (DC version). The current draw at full speed with the wheels up is a good indication of the friction in the drive system

but you also need to make sure something is not loading up a bearing when the robot is on the floor.

The motors do spin at slightly different speeds in forward vs reverse. If you want the robot to go perfectly straight you will need to tweak the numbers drive one motor more than the other - but it should not be off by 40%.
  #7   Spotlight this post!  
Unread 08-02-2006, 06:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Robot doesn't drive straight

This is sounding more like a mechanical problem than a programming or electrical one. I'd look to see whether the left side of the drive train has more friction than the right side, or the wheels are not mounted perfectly straight.
  #8   Spotlight this post!  
Unread 08-02-2006, 09:10
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Robot doesn't drive straight

Quote:
Originally Posted by Donut
We've run into a similar problem; when runnning forward, the left side of our robot started before the right side, and we believe attained a higher speed. The same problem occurred in reverse, only with the sides switched. I'm thinking their is either a problem with the victors' calibration or that the CIMs have some kind of motor bias (this could have to do with the fact that motors on opposite sides spin opposite directions to drive the robot the same direction).
Bingo, this is probably a combination of motor bias combined with differences in each CIM motor. Are you sure about the 40%?

There are a couple of ways team 95 has handled motor bias like this in the past:

1. Calibration. If you have shaft encoders on each CIM or transmission, you can make a correction map that maps a "desired" pwm value to an actual one. You can also linearize the motor response like this.

2. Rotation feedback. You have a gyro, consider using it to stabilize undesired yaw with a feedback loop. I can probably give you some sample code if you have the gyro working already. I've seen this work well for bots that *really* can't drive straight without it (including a bot with a noticeably assymetric drivetrain last year, I don't recall the team number). You can also do PID rotation rate control on the motors, too, but this is more tuning.

3. Adhoc correction factors. Basically, trim your joystick so that the undesired yaw is offset.

4. Driver training.

From our team's experience, #2 is the easiest and most reliable way to go (although #1 and #2 in combination works better). I don't recommend #3 or #4.

Plus, whatever you can do mechanically to fix it makes the programming simpler. Programming can correct a lot of mechanical ills, but you're generally better off if you fix the mechanical problems mechanically.

Last edited by kaszeta : 08-02-2006 at 09:22. Reason: more in feedback
  #9   Spotlight this post!  
Unread 08-02-2006, 09:20
Greg Needel's Avatar Unsung FIRST Hero
Greg Needel Greg Needel is offline
REVving up for a new season
FRC #2848 (All-sparks)
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 3,108
Greg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond repute
Re: Robot doesn't drive straight

Another common problem i have seen like this is wheel size.

If you are using pneumatic tires make sure the outside diameter of the tire is the same.

If you are using solid tires make sure the wear is the same.

When tires have difference sizes from side to side then the robot will travel a bit farther causing a turn regardless of the output speed from you reduction being the same and your pwm value.
__________________
Greg Needel│www.robogreg.com
Co-founder REV Robotics LLC www.REVrobotics.com
2014 FRC World Champions with 254, 469, & 74
  #10   Spotlight this post!  
Unread 08-02-2006, 10:36
Richsgt Richsgt is offline
Registered User
AKA: Rich
FRC #0836 (Bobcat Robotics)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 1996
Location: Waldorf, MD
Posts: 37
Richsgt is a jewel in the roughRichsgt is a jewel in the roughRichsgt is a jewel in the rough
Send a message via AIM to Richsgt
Re: Robot doesn't drive straight

Check the current going through to each side as well, significantly more current draw to one side would seem to indicate a mechanical alignment problem somewhere within the system, especially if using any sort of chain drive.

Also when the Robot is not on the ground, eg up on blocks of some sort, are the wheels/drivetrain spinning at the same rate?
  #11   Spotlight this post!  
Unread 08-02-2006, 12:22
Elgin Clock's Avatar
Elgin Clock Elgin Clock is offline
updates this status less than FB!
AKA: the one who "will break into your thoughts..."
FRC #0237 (Black Magic)
Team Role: Mentor
 
Join Date: May 2001
Rookie Year: 2001
Location: H20-Town, Connecticut
Posts: 7,773
Elgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond repute
Send a message via AIM to Elgin Clock
Re: Robot doesn't drive straight

Quote:
Originally Posted by Donut
We've run into a similar problem; when runnning forward, the left side of our robot started before the right side, and we believe attained a higher speed. The same problem occurred in reverse, only with the sides switched.
That's the key. When your motors are mounted in opposite directions on 2 sides, 2 are in the forward direction, and 2 are in the reverse direction.

Most, if not all, motors usually have a max rotation value (RPM) in the forward direction that is higher than that of a reverse direction.

The drill motors are the biggest culprits of this. The speed is almost (guessing) 25% less in reverse than in forward.

You will have to either:

A) Find the difference and fix it in programming. - Don't ask me how, I just know it can be done.

(If you are using tank driving with 2 joysticks - 1 for each side)

B) Learn how to drive the robot with a touch more pressure on the left joystick than the right while moving forward and the opposite going in reverse. (Smooth ride)

C) Learn to drive with both sticks completely forward and then let off occasionally on the left to compensate. (Possible jumpy ride)


Of course, unless I am misunderstanding this, you are using tank drive, and this is the cause of the problem.

B is the best human way to compensate unless you know what you are doing in programming and trust it.

Maybe a combination of A & B is needed.

edit: Oops, kaszeta kind of beat me.
http://www.chiefdelphi.com/forums/sh...49&postcount=8
__________________
The influence of many leads to the individuality of one. - E.C.C. (That's me!!)

  #12   Spotlight this post!  
Unread 08-02-2006, 23:21
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,302
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Robot doesn't drive straight

Well, we found part of the problem at least. We were using last year's drive code, and missed a part of the code that added 5 to the joystick value before it was given to the motors for no documented reason. We are using a one-joystick mixing system, and when the x-axis values were fed through, this caused one pwm value to decrease by 5 while the other increased by 5, throwing our motors out of sync by 10 pwm values at all times.

We've also reversed the wires from the victors to the motors on one side, so that we are sending the same pwm to all 4 motors, in case the victors or motors respond better to certain pwm values (high rather than low or vice versa).

We have not tested the motors yet since we made the programming fix, hopefully the problem should be solved tommorow. We have been testing our robot off the ground on a crate. I don't know about the 40%, that's what bush was having a problem with.
  #13   Spotlight this post!  
Unread 08-02-2006, 23:47
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Re: Robot doesn't drive straight

And that was just an estimation. I know that the problem was significant when we were engaged in low-speed, and noticable when engaged in high-speed.
  #14   Spotlight this post!  
Unread 08-02-2006, 23:59
Paul Copioli's Avatar Unsung FIRST Hero Woodie Flowers Award
Paul Copioli Paul Copioli is offline
President, VEX Robotics, Inc.
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Rockwall, TX
Posts: 1,391
Paul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond repute
Re: Robot doesn't drive straight

First, the CIM motors do NOT have bias. The windings are perfectly symmetric. There still may be slight differences in each direction due to other factors, but at loaded conditions this difference should be unnoticeable. I did significant testing on the kit base and kit transmissions (2 CIMS mounted in opposite directions) and the robot would only drift 6 inches sideways in 54 feet.

Second, the phenomenon you described when stopping is that one side kept going and one side stopped could be due to the brake setting on the victors. There is a little plastic jumper between pins on the victors. The three pins are A, B, and C. If the jumper is between A and B (Always Brake), then the Victors will come to a sudden stop. If the jumper is between B and C (Better Coast), then the victors will come to a slow stop. If the jumper is missing, then the victors will also brake. We have found that if you are doing a PID loop on the drive base (via encoders, etc.) you may want to put the victors in brake mode to help with oscillation.

-Paul
  #15   Spotlight this post!  
Unread 09-02-2006, 00:00
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Re: Robot doesn't drive straight

Just read over some documentation.
I have a couple guesses for my problems...
The problem where the robot turns left when stopped could be due to the left Victor having brake mode enabled, and the right one has coast mode enabled.
The problem where the robot veers one direction with the same value applied to each Victor could be due to miscalibration.
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
Pre-Rookie Teams - The How To Keith Chester General Forum 6 17-09-2008 00:28
If you could change one rule - eliminate ship requirement discussion Andy Baker General Forum 53 28-10-2005 22:23
What is wrong with this code???? It won't Compile and I don't know why? Please Help CrashZero Programming 23 26-03-2004 09:44
Public apology from myself (Team 830) Don Wright Rules/Strategy 13 14-03-2004 22:02
Wanna drive RAGE's robot? archiver 2000 1 23-06-2002 23:39


All times are GMT -5. The time now is 05:37.

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