Go to Post Without mentors, you wouldn't even be participating in FIRST. Your team wouldn't exist, and FIRST as a program wouldn't exist. If it did, it'd just be another form of a science fair. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2017, 17:21
NicholasJJ NicholasJJ is offline
Registered User
FRC #4014
 
Join Date: Jan 2017
Location: California
Posts: 4
NicholasJJ is an unknown quantity at this point
Question 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?
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2017, 17:29
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,943
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2017, 17:50
NicholasJJ NicholasJJ is offline
Registered User
FRC #4014
 
Join Date: Jan 2017
Location: California
Posts: 4
NicholasJJ is an unknown quantity at this point
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2017, 17:52
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 544
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Robot takes a while to start up in autonomous mode

Yep. Gyro's have a 5sec blocking period when you initialize them.
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2017, 17:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,943
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2017, 18:53
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,108
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Robot takes a while to start up in autonomous mode

Quote:
Originally Posted by Mark McLeod View Post
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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #7   Spotlight this post!  
Unread 05-02-2017, 16:27
Jpatterson1710's Avatar
Jpatterson1710 Jpatterson1710 is offline
Registered User
AKA: Josh Patterson
FRC #1710 (Ravonics Revolution)
Team Role: Alumni
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Olathe, KS
Posts: 103
Jpatterson1710 has a spectacular aura aboutJpatterson1710 has a spectacular aura aboutJpatterson1710 has a spectacular aura about
Re: Robot takes a while to start up in autonomous mode

Quote:
Originally Posted by virtuald View Post
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.
__________________
2012-2014 Mechanical Team FRC 1710
2014-2015 Chief Operations Officer FRC 1710
2016-Present FTAA
Reply With Quote
  #8   Spotlight this post!  
Unread 08-02-2017, 21:56
NicholasJJ NicholasJJ is offline
Registered User
FRC #4014
 
Join Date: Jan 2017
Location: California
Posts: 4
NicholasJJ is an unknown quantity at this point
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 08-02-2017, 22:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,943
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot takes a while to start up in autonomous mode

Thanks for letting us know how you fixed it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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