Robot running without Controller input

As soon as we put the bot into telop one of our victor slaves runs for a bit and then it stops and repeats this process, all without input from the controller. The controller is being completely ignored for everything.
Dashboard also gave us errors saying that our pneumatics commands/subsystems were not registering and kept saying that our robot was not responding, and no robot code was visible

Can you try commenting out the driveForwardTimed and driveToDistance commands you are creating (lines 52-56). It looks like for driveToDistance on initialize you are running: finish = driveTrain.driveToDistance(Constants.SETPOINT_FORWARD, Constants.AUTONOMOUS_SPEED);

I would encourage you to create these commands when you actually need and want to use them.

How did you verify that only a single Victor was moving? Can you tell us what the status LED of all 4 drive motors are doing during this?

The one victor was green the others were still blinking.

Blinking orange? That implies they were not being commanded at all. They should at least turn solid orange when enabled. Can you use Phoenix tuner to verify all of the CAN ids?

1 Like

WE have updated the code to remove the old autonomous commands of DriveForwardTime and DriveToDistance. we had forgotten to update the code when we made this post. we went back through and all of our can devices showed up. On the driver station when we tested the code again instead of getting the Telop-enabled message we’re getting “Watchdog not fed” what does this mean?

The watchdog is a feature of the drivetrain to ensure it has a continuous connection with the robot program and there are no “run away” robots. Thus it requests you update the drive motors every period with a new value (or “feed” the watchdog).

Do you get this message only at the beginning when your program is starting, constantly, or when you do some action? Is anything not working properly, if so how would you expect it to work?

As soon as we enable the bot in teleop we receive this message and proceed to receive it constantly.

Check to see if you are stuck in a loop in teleop.
Anything longer than 20ms can cause a watchdog error
Using for/next is a good way to get stuck in a loop for too long

What are you thinking is normally controlling the bot in teleop? It looks like DriveWithJoysticks command is set as default for the drivetrain and that calls drivewithJoystick (would be nice to inline this) in the DriveSubystem which looks completely empty. Since nothing is updating the drivetain the watchdog constantly expires