Go to Post Mentors learn from, are inspired by, and emulate each other. A team with a great lead mentor leads to a productive, inspired, and ultimately successful group of mentors. - Jared Russell [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 10-02-2012, 11:59
FalloutSoftware FalloutSoftware is offline
Registered User
FRC #3509
 
Join Date: Feb 2012
Location: Niles
Posts: 3
FalloutSoftware is an unknown quantity at this point
Exclamation Robot Motors Drifting?

Hey guys quick question, my team has a robot with 8in mecanum wheels. We have one Cim motor per wheel. The front right and back left wheels are slowly moving when it should be still. The question I have is: Is there a way to "calibrate" the joystick to the motors? We are using a brand new Xbox 360 controller. The is no drift in the stick itself because the drift is present while using the Attack 3 joystick as well. Please help me!! Thankyou!
  #2   Spotlight this post!  
Unread 10-02-2012, 12:43
chadr03's Avatar
chadr03 chadr03 is offline
Registered User
FRC #2582 (PantherBots)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Lufkin, TX
Posts: 65
chadr03 has a spectacular aura aboutchadr03 has a spectacular aura aboutchadr03 has a spectacular aura about
Re: Robot Motors Drifting?

Sounds like you need to calibrate your motor controllers. I am somewhat familiar with Jags. I bet the procedure is similar on Victors and can be found in the documentation. On Jags you have to use a paperclip to hold down a reset button and move your joystick through its entire range of motion. I can’t remember off hand what the exact sequence is but you can find it in the documentation.
  #3   Spotlight this post!  
Unread 10-02-2012, 12:56
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Robot Motors Drifting?

Quote:
Originally Posted by chadr03 View Post
Sounds like you need to calibrate your motor controllers.
From the TI Jaguar FAQ:
Quote:
Q38 Do I need to calibrate the Servo (PWM) interface?
A
It depends. The motor controller has a calibration mode, and the need to calibrate depends on the Servo
(PWM) signal range generated by the robot controller.
For FRC users, the answer is probably not if you are using the cRIO system and a new motor controller.
The default parameters of the motor controller are tuned for use with the cRIO. The calibration mode is
provided if you want to use the motor controller with another source of Servo (PWM) signal that does not
have the same range of pulse widths (for example, an older robot controller). Or, if you have calibrated
your Jaguar (MDL-BDC) from a different source and move it back to a cRIO system, you must recalibrate.
From what I've heard the XBox Controller's do not self-center very well, due to their design. Joysticks may not perfectly self-center either for various reasons. We normally code a "deadband" of about 5%, to not only deal with self-centering but to also deal with the Driver not necessarily centering the Joystick when their hands are on the controller.

The way a deadband works is if a signal is within a range (say +/-5%) it outputs a zero. Otherwise it outputs the input signal. Pretty easy and then you don't have this to worry about again.
__________________
  #4   Spotlight this post!  
Unread 10-02-2012, 16:40
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,112
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 Motors Drifting?

This probably isn't an issue for you, but just in case: make sure your code isn't trying to control a Victor while you actually have a Jaguar installed, and vice versa. The "neutral" signals for each are slightly offset from each other.
  #5   Spotlight this post!  
Unread 10-02-2012, 16:52
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,896
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: Robot Motors Drifting?

To test the PWM signal to the motor controller: Hard code a zero speed command and let the robot sit enabled. If the motors do not run, your PWM is good. It seems we had to add a dead band so if the controller were close to zero it sent a zero command to the PWM.
  #6   Spotlight this post!  
Unread 11-02-2012, 00:09
ianonavy ianonavy is offline
Programming Mentor/Alumnus
AKA: Ian Adam Naval
FRC #3120 (RoboKnights)
Team Role: Mentor
 
Join Date: Dec 2010
Rookie Year: 2008
Location: Sherman Oaks
Posts: 32
ianonavy is an unknown quantity at this point
Re: Robot Motors Drifting?

If you can't figure out how to calibrate either the joystick or the speed controller, you can actually fix this through programming.

I'm not sure what language you're using, so here's some pseudo-Java
Code:
// Teleop
final double THRESHOLD = 0.04;

double x = joystick.getX();
double y = joystick.getY();

if (Math.abs(x) > THRESHOLD || Math.abs(y) > THRESHOLD) {
    drive(y, x);
} else {
    stopDriveMotors();
}
Basically, your motors won't drive unless the magnitude of your joystick values is greater than a certain threshold. That way, if your joysticks are reading "0.03" when they're at rest and should be "0.0", your motors will still be off. This of course means you'll be unable to drive the robot at 3-4% speed, but does the robot even move at that speed anyway?

Hope this helps!
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 10:25.

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