Go to Post Let's not fight, please. Discuss yes, fight no. Please. :) - JaneYoung [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
  #12   Spotlight this post!  
Unread 17-02-2012, 10:56
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Smile Re: Help! RobotDrive Error in all 3 languages

Quote:
Originally Posted by DavidGitz View Post

I suspect that you have one or more of the following problems: a) You still have binding issues in your drive-train b) Bad weight distribution on your wheels c) Not all wheels contacting the ground.
I would add d) drive motors (like CIMS) do not run at the same speeds forwards vs backwards for the same absolute value of PWM request. So many robots have a tendency to have a drift to one side. (lots of threads about that out there in SEARCH-land I bet) Adding a small constant bias solves many of the effects of a + b + c + d.

I'm hacking this in pretty fast, but it should get you going ...
Code:
#define SIDE_BIAS 0.1   // TBD from experimentation
#define NEUTRAL_DEADBAND 0.17  // maybe less - experiment
.
.
. 
		while (IsOperatorControl())
		{
                       float yStick = stick.GetY();    //as opposed to stick->GetY(); ....not sure
                       float xStick = stick.GetX();

                       if( (yStick > -NEUTRAL_DEADBAND) && 
                           (yStick < NEUTRAL_DEADBAND )   )
                       { // in the Y deadband ... spin only so no bias to spin
                           yStick = 0. ;  
                       }
                       else // translating fwd/rev add the bias to the spin axis
                       {
                           xStick += SIDE_BIAS ; // set sign correctly, here
                           xStick = (xStick > -1.) ? xStick : -1. ; // keep in range
                           xStick = (xStick < 1.) ? xStick :  1. ;
                       }
              
			//myRobot.ArcadeDrive(stick); // drive with arcade style 

                        // using squared inputs has a smoothing effect on handling
                        myRobot.ArcadeDrive(yStick,xStick,true) ; 

			Wait(0.005); // wait for a motor update time
		}
...something like that....

For better drift compensation, try a yaw rate sensor as feedback to a proportional control of the SIDE_BIAS value

Thanks,
Eric

PS JAG firmware upgrade instructions:

http://www.usfirst.org/sites/default...ructions02.pdf
__________________

Don't PANIC!
S. P. A. M.

Last edited by EricS-Team180 : 17-02-2012 at 11:04.
 


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 20:15.

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