MoonshotSlaybots / 2019PracticeRobot

The code for the 2019 practice robot
0 stars 0 forks source link

loop time of 0.02s overrun #1

Open 6164DevComputer1 opened 5 years ago

6164DevComputer1 commented 5 years ago

even with a very basic program, with only a single mecanum drive function being called, during teleop a warning is being thrown, Watchdog not fed within 0.020000s Loop time of 0.02s overrun Warning at edu.wpi.first.wpilibj.IterativeRobotBase.printLoopOverrunMessage(IterativeRobotBase.java:273): Loop time of 0.02s overrun

this error is not thrown if the single line in teleop is commented out. could be something wrong with the drive object or the way we are calling it.

21StanTayl commented 5 years ago

I would say, I went ahead and looked at a thread, from a user who had the same issue on Chief Delphi. The thread will be posted down below. I'll try to go through the code here in a second as well and see what I can find. https://www.chiefdelphi.com/t/talon-srx-motion-profile-manual/339369/8

21StanTayl commented 5 years ago

I might have found something that we may want to check for our bot. This is from the Chief Delphi thread posted in the last comment "I HAVE FIGURED IT OUT! After many attempts at changing small variables, it turns out that the reason was then I thought that I could construct the pigeon through a talon using a gadgeteer cable then use that for motion profiling however this is not the case and it needs to be plugged into the can bus. I thought that it would work through the gadgeteer cable because we had used it this way in the 2018 season."

C-Glick commented 5 years ago

I'm running the code without anything plugged into the rio right now. Plus we are using the can bus when we do connect the speed controllers. I think that form post you linked is irrelevant, they are talking about a differnt issue and the overrun warning just happens to show up there as well.

21StanTayl commented 5 years ago

ok, then i'm gonna look in the wpilibrary and see if maybe there is a different method being used to call the mecanum drive

C-Glick commented 5 years ago

Ok, keep in mind, from what I can tell the warning is because the teleop loop is taking too long to execute, but idk why it would take too long because it is so simple.