Issue with Robot Software Hanging During Autonomous

I’m no software expert, so bear with me while I try to explain an issue we’re having with our robot code. For reference, we’re running a roboRIO 2 with the newest version of robotPy installed.

The core issue is that during autonomous (we’re using PathPlanner and PathPlannerLib), after a couple of actions, the robot simply stops. It finishes the command it’s running, and then does not do anything else. It does not matter what succeeds the hanging command, the software just stops. The robot stays enabled and in autonomous, but no further commands are run, as though it has exited the SequentialCommandGroup supplied by PathPlanner entirely. When this happens, the driver station says we’ve had a loop overrun, and then the command it was last running (in this case, run the intake) finishes.

Occasionally, we do get warnings in teleop or while the robot is disabled in the console that we’ve had a loop overrun over 0.02s. This occurs generally when the robot first starts up, and then periodically for the rest of the robot’s runtime. There seems to be no clear reason this occurs, even when all subsystems are disabled it appears randomly.

Here’s a link to a driver station log that includes this event occurring.

Here’s a link to our most up-to-date robot software.

I don’t have a log viewer handy for the rio logs, but your loop overrun should tell you which method was the one called that overran.

Does it end at the same point every time when it stops executing the command group in autonomous?

If you were to build a version of that command run it from teleop does it seem to matter?

The only thing that appears to be over the 0.02s limit in the error is RobotPeriodic, which only contains the commandscheduler, all subsystems are well under the limit even summed together, but maybe I’m misreading it.

Yes, it stops at the some point every time.

I’ve not run a combined “pathplanner run path” and “intake” command in teleop, but both commands function independently without causing an overrun. Intake is the same command as what runs in teleop, and we have no issues like this in teleop. A path will run early in the play as well without issue.

Finally resolved the issue this morning, post for clarity in case anyone else has a similar issue. There was a trigger in RobotContainer to flash LEDs on the robot when a note was collected, which when picking up a note, resulted in the robot trying to supply information to two portions of the code at once, forcing the commandgroup to interrupt and make the robot appear to hang. Disabling this notification prevents the interruption and lets the play proceed.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.