Running the attached python code in the simulator fails with a message about the Watchdog timer not being fed within 0.02s. I can’t find where the code is wrong. Hoping someone else will see the problem.
RobotError.zip (11.6 KB)
It’s just a warning, if it happens just once at the beginning of teleop I wouldn’t worry about it.
No, there’s more than that. Also get a PrintLoopOverrunMessage error and then a Windows fatal exception: 0x80040155 when I try to do something in the simulator window.
I don’t have Windows so I can’t test precisely the same thing that you’re talking about. However, on my mac I get a python error that ends the program when I switch from teleop to autonomous:
File "commands/arcadeDrive.py", line 16, in end
self.drivetrain(0,0)
TypeError: 'DriveTrain' object is not callable
So you’ll want to fix that.
What thing are you clicking that is causing the fatal exception?
Eliminating the code that allocates the gyro in the physics module solved the overrun problem. The function call wpilib.simulation.AnalogGyroSim() hangs the system.
What I’m trying to do is create a Command Based Python robot with just a drivetrain, no other sensors, etc., that will run in the simulator. However I have totally failed at creating a physics module that actually works. Any help would be appreciated.
P.S. I don’t have an actual robot to test with.
The ramsete example (https://github.com/robotpy/examples/tree/main/commands-v2/ramsete) is command based and only has a drivetrain (and some trajectory stuff, but that should be straightforward to remove) and runs in the simulator.
… did your windows fatal exception go away? If you can provide a way to reproduce it, we can address it.
Thanks for this. It provides exactly what I wanted, a test bed for writing commands that I can show my students.
The Windows exception went away when the overrun problem went away.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.