![]() |
JAVA RobotDrive Motors Signal Out of Sync
During programming of our test stand in JAVA, we found that regardless of control channel for the move speed value, the motors start rotating at different points. This will cause a robot to turn at low speeds with no turning inputs.
This issue was confirmed with multiple channel changes of the motors, and the problem switching motors if the channel for motor signal is switched. Is there an inherent problem in the RobotDrive or other library files that may be causing this problem? We are using the arcadeDrive function to feed outputs to the robot. Regardless of the changes made to the control scheme the problem persists. Resolution of this issue appears to require a PID controller to ensure constant direction without turning input. While this would be one way to solve a built in turn, this should not be required to make an aligned robot move straight forward. Anyone with information on this issue would be much appreciated. |
Re: JAVA RobotDrive Motors Signal Out of Sync
Post your code?
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Here is the current code we are using, for a controller we are using the Logitech X30 flight stick.
Code:
|
Re: JAVA RobotDrive Motors Signal Out of Sync
You can calibrate your speed controllers to fix this. If you look online, you can find a manual for your speed controller that should explain how.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
But when I go into reverse the motor that starts first switches to the other motor; it isn't motor specific or even controller specific. More so which virtual motor it correlates to. Would calibrating the motors still fix this?
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Quote:
The PWM controllers have a small deadband where they will give no power. If one controller considers the zero point to be slightly ahead of where it should be, it will be late to start when going forward and early to start when going backward. |
Re: JAVA RobotDrive Motors Signal Out of Sync
Even if when I change motor controllers, meaning the on that previously started before and the one that started later are switched, the problem still happens with the same virtual motor.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Try calibrating the joystick?
|
Re: JAVA RobotDrive Motors Signal Out of Sync
We have used the slider Axis on the front bottom in order to have no side to side input and the problem still occurred. Also we have a dead zone and using the control panel to have it as centered as possible it still happened. I'm wondering if the error is inside the RobotDrive function provided by FIRST that one motor doesn't start as soon. Thank you for helping, all ideas help; We will definitely calibrate them first thing tomorrow as well.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Sounds like something is lagging. I would try disabling the camera stuff.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
What type of speed controller are you using?
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Victor SP controllers, and the camera isn't currently being used but I'll definitely comment it out for now.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Quote:
|
Re: JAVA RobotDrive Motors Signal Out of Sync
I'll change that, would that cause the motors to be set different values?
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Yes, the PWM timing is different.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
I've changed it to VictorSP and the error is smaller but it is still there.
|
Re: JAVA RobotDrive Motors Signal Out of Sync
Watch the LEDs on the motor controllers. Is one motor controller's throttle LEDs activating before the other ones? If so you may need to calibrate all the Victor SPs, or factory-default all the Victor SPs. Either will ensure identical throttle response.
If the observation is just the motor beginning to spin differently, that can happen since no two motors are truly identical (and have identical loads). Also be sure you are applying the same throttle to all Victor SPs(i.e. make sure there isn't something going on in your math). |
Re: JAVA RobotDrive Motors Signal Out of Sync
Our team had a similar problem last season. At first, we though it was an electrical problem and we tried various methods such as calibrating our Talons several times. We finally determined the problem was with the joystick (Logitech X30 Flight Stick) and it was off-center slightly when no one was touching it. This issue made it to look as if some of the speed controllers were lagging. We tried to recalibrate the joystick through Windows but it didn't seem to help. We got another joystick of the same model and seemed to work fine for several months but recently it's giving us the same issue.
I would suggest for you to look to see if all the axis are at the same values in Driver Station. Even a minor difference will produce drastic incorrect movement. If the values aren't equal, try calibrating the joystick (through Devices and Printers in Windows) or you could try completely opening the joystick and centering it again. Another alternative would be to try QDriverStation which allows using the keyboard as input. If you absolutely have to get another joystick, I'd recommend going for a 360 controller or going for a higher-priced joystick. |
| All times are GMT -5. The time now is 22:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi