Originally I had a different post, but that has been resolved, but a new error was created…
Our robot’s wheels have been moving every 2 to 3 seconds very slightly (maybe 5 degrees), and I have no idea why this is happening. It’s happening somewhat randomly. I’ve looked through my code, and I don’t even know where to begin to try and fix this error.
Watch your speed controller status lights.
They should remain solid when they are in neutral, but if they blink a little when the unexpected movement occurs, then they probably need to be calibrated.
Thanks for the reply. We tried calibrating the motors, but that was unsuccessful. It almost looks like it started doing it even more. They all blink in unison when they fire. Whats really weird though is that the random movement happens on the 4 movement controllers, and not on the other 2 we have for other functions.
This is the guide we followed for calibrating the Jaguars, so if there was an error in the process, then let me know.
Jaguar Motor Controller Getting Started Guide
To calibrate the servo-style PWM input for a specific range, connect a PWM source, then:
Hold down the USER switch with a straightened paper clip for 5 seconds.
The LED flashes Red and Green to indicate Calibration mode.
Instruct the controller to send a full-forward signal for one or more seconds.
Instruct the controller to send a full-reverse signal for one or more seconds.
The LED flashes Green and Yellow quickly to indicate a successful calibration.
The Jaguar samples these signals and centers the speed range and neutral position between these limits. A
calibration failure signals if an out-of-range signal is detected.
This condition is indicated by flashing the LED Red and Yellow.
We are using a 4 motor / 4 jaguar / 2 split PWM cable setup.
Its basically all default code, where the only changes are inverting one sides motors with the built in inversion switches in default code, and then a multiplication function with -1 applies to the X axis to correct turning after the inversion.
We have the basic default code for compressor in begin.vi and periodic tasks.vi. Two more simple motor control/PWM codes to run ball feed and angle, but they dont seem to be affected the way the 4 drive motors are.
Our only other code runs in periodic tasks and its a sequential frame of solenoid functions.
The twitching really only moves the wheels like 5-10 degrees when the robot is blocked up and the wheels are suspended. It might not even be enough to move the robot when loaded and on the floor.
You can put your robot into test mode using the driver station. That allows you to watch sensors that you’ve opened while the robot is safely disabled, and it allows you to drive actuators that you’ve opened when enabled. Note that periodic code will continue to run, even in test mode.
It also allows you to run test VIs that you write to calibrate or verify controlled mechanisms.
We’ve seen this before on our robots. What does the dashboard report as your CPU utilization? If we’re running at 100%, we see this on occasion. Do you have any unthrottled loops?