![]() |
Re: Twitchy Motors
Quote:
Before swapping out for Y-cables, have you tried removing 3 of the existing ones and seeing if the issue is still occurring? Only have one connected at a time and see if you can narrow down the specific cable/port/controller combination that triggers the condition? The video only shows one side of the drive train twitching so I'm not sure if the other side is doing it as well like ours was. |
Re: Twitchy Motors
In addition to what Nate said:
This only occurs when the robot is enabled, correct? Another thing you could try, although I imagine it will have no effect, is try switching languages to C++ and see if the problem still occurs. Just use the default example code and see if it twitches. |
Re: Twitchy Motors
Both sides twitch. I removed all but one PWM for each talon and each talon individually twitches.
I set it to autonomous and found it didn't twitch. I set each motor value to 0 and found it still didn't twitch. To make sure I coded it right, I set one side to a value of 1 and it moved constantly at full speed while the other side didn't move at all. It only twitches when enabled in TeloOp. |
Re: Twitchy Motors
Huh. Well I switched C++ and slightly modified the code (someone should check if I entered the motor ports correctly) and the motors didn't twitch.
Code:
#include "WPILib.h" |
Re: Twitchy Motors
That C++ code is correct, and if it didn't twitch then the problem seems to be with Java.
Do you have the latest updates and everything installed for Java/WPILib? |
Re: Twitchy Motors
Quote:
Do you have any dead-band in your software so that the joysticks must move a significant amount before the system responds? I did not notice any mention of dead-band in this thread yet. In Auto-mode, dead-band is not an issue since the software should be ignoring your joysticks. Perhaps set your dead-band to some large value to see what effect it has. |
Re: Twitchy Motors
I can't check the firmware version because the web dashboard is showing a white screen. (If I remember correctly, the version number is 3.0.0f0)
My eclipse plugins versions are now updated to 0.1.0.201602112135. When I image the roborio I use the FRC_roboRIO_2016_v19.zip image. The JRE is ARMv7 Linux - VFP, SOftFP ABI, Little Endian^2. Since I updated the eclipse plugins, I now have this message in the driver station: ERROR 1 PWM 7... Output not updated often enough. java.lang.Thread.run(Thread.java:745) ERROR 1 PWM 6... Output not updated often enough. java.lang.Thread.run(Thread.java:745) ERROR 1 PWM 5... Output not updated often enough. java.lang.Thread.run(Thread.java:745) ERROR 1 PWM 4... Output not updated often enough. java.lang.Thread.run(Thread.java:745) |
Re: Twitchy Motors
I do not have any dead band. Earlier I tested it by setting the values to 0 and it still twitched, so i don't think it's the controllers.
![]() I unplugged the controller so it wouldn't receive any input. |
Re: Twitchy Motors
You need some dead-band. It allows your system to ignore the noise that you will invariably have coming out of your joysticks. Do a search on this forum for how to properly implement the dead-band.
|
Re: Twitchy Motors
I've implemented a deadband, but it still twitches.
Code:
public void operatorControl() { |
Re: Twitchy Motors
Have you tried switching out the joystick or game pad?
|
Re: Twitchy Motors
Yes, I've swapped between an xbox controller and two Logitech Extreme 3D Pro joysticks. I don't think it's the controller because I've also tried running it without controllers and it still twitches.
|
Re: Twitchy Motors
In your Java code, you are addressing each Talon individually, and it is causing the motors to Twitch.
In the C++ code, the motors are NOT twitching, when you are calling the ArcadeDrive method. Try addressing each talon in C++ and see if it twitches. Try this code and see if it twitches: Code:
#include "WPILib.h" |
Re: Twitchy Motors
Neither time did it twitch.
I modified the code because you were using myrobot when it didn't exist. Code:
#include "WPILib.h" |
Re: Twitchy Motors
We found the solution. It was because we were missing motor.setExpiration(0.1)
Code:
public Robot() { |
| All times are GMT -5. The time now is 22:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi