Romi randomly stops taking input

I just got a Romi and flashed my Raspberry Pi 3B with the WPILibPi 2021.2.1 image and followed all the steps in the Getting Started with Romi documentation. I was able to create a Java RomiReference example, and get it to start running. The Robot works fine in teleop mode, but after a minute or so, it seems like it will no longer take any input, and the robot continues to run (usually runs into a wall). The only way to reset is to switch the power off and turn it back on. This doesn’t seem right.

There are a couple of errors that pop up in the debug terminal when this happens:

Warning at edu.wpi.first.wpilibj.IterativeRobotBase.printLoopOverrunMessage(IterativeRobotBase.java:301): Loop time of 0.02s overrun

Warning at edu.wpi.first.wpilibj.Tracer.lambda$printEpochs$0(Tracer.java:63):   teleopPeriodic(): 0.030736s
        SmartDashboard.updateValues(): 0.000054s
        robotPeriodic(): 0.000134s
        LiveWindow.updateValues(): 0.003910s
        Shuffleboard.update(): 0.000004s
        simulationPeriodic(): 0.000004s

Any idea what could be going on? I didn’t touch a single line of code. After the example was generated, I just hit Run -> Start Debugging

Sorry, I’m not really a robot software guy, so bare with me while I learn.

When the robot continues to run, is it still enabled (via the Sim GUI)? Also try starting the robot program via Ctrl+Shift+P -> Simulate on Desktop (or press F5)

Can you also download the romi-service-1.1.4.tgz file from Release Romi Web Service v1.1.4 · wpilibsuite/wpilib-ws-robot-romi · GitHub and upload it to the Pi using the web UI? This has a couple of failsafe mechanisms that should prevent runaway situations.

I try to disable it in the Sim GUI, but it does nothing when it stops taking input.

Is there a difference between Simulate on Desktop and the Run -> Start Debugging?

Both seem to be having issues. I’m guessing it has to do with being obstacles in the way when I’m driving it (maybe causing wifi packets to drop?).

I will try installing the romi-service package.

OK, so I installed the romi-service-1.1.4.tgz, and there still seems to be odd behavior. Almost as if there’s some sort of buffer of inputs that are stored, but their execution gets interrupted for several seconds, then continues. Sorry, I know this doesn’t clarify a whole lot.

My expectation is that if connection is somehow interrupted or a watchdog times out, the robot would just stop moving. Is that not the case?

If the connection is lost, the robot will cut power to the motors. We’ll do some investigation on what happens with laggy connections

1 Like

Thanks, it really only seems to be happening when the robot is far-ish away from my laptop or there’s a wall between my laptop and Romi (like when I’m driving it rom another room). So I’m guessing it’s a connection issue.

Could you put an issue on GitHub - wpilibsuite/wpilib-ws-robot-romi with some of the details that were mentioned here? It’ll be easier for us to track :slight_smile:

2 Likes

In the beginning, we noticed similar behavior. Any run time error would max one or both of the drive wheels out. I do not think it has happened in awhile, but we are programming fewer runtime errors too :slight_smile:

Submitted. Thanks for looking into it!

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