Go to Post Sometimes i wish the robot could fit into my pocket. - GMAdan [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, 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,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 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.
  #2   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,933
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.
  #3   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 04:46.

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