Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Robot takes a while to start up in autonomous mode (http://www.chiefdelphi.com/forums/showthread.php?t=154745)

NicholasJJ 04-02-2017 17:21

Robot takes a while to start up in autonomous mode
 
Hi, I'm having a bit of a problem with autonomous mode on my team's robot. after starting autonomous, the robot waits a few seconds and a bunch of these errors:
Code:

Error 1 Robot Drive... Output not updated often enough. java.lang.Thread.run(Thread.java.747)
show up on our drive station. After a while, the errors stop and the robot completes all the autonomous tasks perfectly fine. does anyone know how to solve this problem?

Mark McLeod 04-02-2017 17:29

Re: Robot takes a while to start up in autonomous mode
 
Initializing a camera at the start of Autonomous might cause a blocking delay like that.

NicholasJJ 04-02-2017 17:50

Re: Robot takes a while to start up in autonomous mode
 
Thanks, but our code doesn't have any camera initialization. We are initializing a Gyro, would that cause something like this?

Arhowk 04-02-2017 17:52

Re: Robot takes a while to start up in autonomous mode
 
Yep. Gyro's have a 5sec blocking period when you initialize them.

Mark McLeod 04-02-2017 17:54

Re: Robot takes a while to start up in autonomous mode
 
I'd suggest commenting out all code leaving just enough to see that Auto is running and Teleop is running, then if the delay is gone just add things back in gradually to see when the delay reappears.

Initialize the gyro during Disabled.

virtuald 04-02-2017 18:53

Re: Robot takes a while to start up in autonomous mode
 
Quote:

Originally Posted by Mark McLeod (Post 1640455)
Initialize the gyro during Disabled.

I would recommend initializing the gyro during robotInit, otherwise the field might think you're ready and start a match before the gyro finishes initialization.

Jpatterson1710 05-02-2017 16:27

Re: Robot takes a while to start up in autonomous mode
 
Quote:

Originally Posted by virtuald (Post 1640478)
I would recommend initializing the gyro during robotInit, otherwise the field might think you're ready and start a match before the gyro finishes initialization.

Generally speaking, the best way to make sure the field knows you're not ready is to stand in your driver station holding a thumbs down in the glass. Often times, our field monitor may be completely green, but teams are still waiting for gyros, camera feeds, or some smart dashboard mess. A good FTA (which as far as I know is all FTAs) would see your thumbs down and would be able to assist before starting the match.

*A simple thumbs down is sufficient. No need to start banging that thumb into the glass unless a countdown to start match has begun.

NicholasJJ 08-02-2017 21:56

Re: Robot takes a while to start up in autonomous mode
 
Thanks for the help!
Turns out that a PID loop was causing the problem, I took it out and everything works fine now.

Mark McLeod 08-02-2017 22:52

Re: Robot takes a while to start up in autonomous mode
 
Thanks for letting us know how you fixed it.:)


All times are GMT -5. The time now is 22:36.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi