Quoting a few posts from another thread, so we can get a specific discussion on what and why this happened. Here’s my post:
Also:
A few more details for our situation: We program in Labview, our drive motors run off of the sidecar in ports 1-4 using talons, but there is no drive code in autonomous. We’re still trying to get the video to confirm a few things, but we’re pretty sure we were spinning counter clockwise; we don’t know if the conveyor or shooter motors were running also. It would seem that the motor controllers must have been getting sent a constant PWM value of zero to make them circle counterclockwise; when we check the video hopefully we can see if all the motors had the same problem. I stated that we checked the code and then went to the field; I can’t say for absolute certainty that we didn’t deploy something after our last test but I don’t think so, I don’t think we had time. One theory is that we did deploy new code but it didn’t load correctly and so the cRIO automatically sent zero variable values, which then got corrected when we redeployed later. Has anyone ever had that happen, or is it even possible? Is there any way that losing connection or reduced bandwidth would cause variable values to go to zero? The FMS and out display showed that we stayed connected. I’m hoping we can find a common problem so that teams can test for it in the future.
We had a problem with “phantom autonomous” at a scrimmage yesterday. In our case, it was because we did not reboot the robot after previously driving it, and since our robot was driving when it got disabled, the cRIO held the last PWM values and started sending them again as soon as it was enabled, even though there was no drive code in autonomous. We fixed our problem by sending a drive command of 0 during autonomous to make the motors stop.
I still don’t know what caused our weirdness, but I’ll add a little to this discussion.
We have 4-wheel independent swerve drive. We were spinning in circles for a couple seconds while the driver let loose of the controls. This means that the PID loops for the moduals had to be functioning normally. This leads me to believe that the driver station data was not being sent or was delayed.
Remember also that there are a lot of different potential causes for what you are observing and people are reporting. These could all be unrelated occurances.
If the robot is normal in auto, but spins in teleop, it may be that the joysticks were not centered when they were plugged in or when the DS was opened. Modern joysticks have a great feature where they take their current setting as zero when the SW opens a connection. While this auto-trimming feature helps with old joysticks, it isn’t limited, and can result in a robot that drives itself when hands are off the joystick. The default dashboard may help diagnose, as it would show the value being sent to the motors and read from the joystick. To correct this in a match, you unplug the joystick, plug it in again, and hit the F1 key. This would present itself the entire match and wouldn’t just show up partway through.
A robot that spins during auto but not during tele may be due to a faulty sensor, sensor connection, or sensor calibration. Mess with robot reference point and oh how they spin. The sensor could also be used in tele, but since they often aren’t, …
Of course I’ve also seen plenty robots spin when a chain comes off, wheel gets a game object caught in it, etc. I am not claiming that this pertains to any of these cases, but numerous times, the team assumed field caused it until they actually inspected the robot. The PWM cable or digital breakout cable can cause similar symptoms.
When this happens next time, take a look at your driver station. The driver station has a nice graphic imagine of what the Joystick inputs look like. There is a dot on the screen that is a virtual representation of the joystick position. We had a case where the joystick position in the driver station did not match the joystick real position which caused the robot to spin out of control. We thought it was a bad joystick so we replaced it. Later…I think what would have fixed it is the “F1” refresh key trick, to refresh the joysticks in the driver station. In the mean while we took no chances and swapped the joystick.