|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Robot Motors Drifting?
From the TI Jaguar FAQ:
Quote:
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
|
|||||
|
|||||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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();
}
![]() Hope this helps! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|