Go to Post The term normal is relative to CADer side of me. When compared to the rest of society, there is no normal side of me. - Pault [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 01-12-2012, 09:13 PM
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Exclamation Error: a timeout has been exceeded

the full errer reads: ERRER: A timeout has been exceeded: RobotDrive... Output not updated often enough. ...in Check() in C:/WindRiver/workspace/WPILib/MotorSafetyHelper.cpp at line 123

does any one know how to fix it. I feel like it might be something simple, but my brain is fried.

please help....
__________________
Love, Peace, and Robot Grease
Reply With Quote
  #2   Spotlight this post!  
Unread 01-12-2012, 09:20 PM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 587
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
That usually means that the motors in your RobotDrive object aren't being refreshed often enough or the timeout on the motor safety is too short. Check that you don't have any long Wait function calls that would put a delay between motor speed updates.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 01-12-2012, 09:20 PM
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Re: Error: a timeout has been exceeded

the only wait a have if the wait(0.005) for the motor update

Forgot to include my code
here it is:

#include "WPILib.h"

/**
* This is a demo program showing the use of the RobotBase class.
* The SimpleRobot class is the base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls.
*/
class RobotDemo : public SimpleRobot
{
RobotDrive myRobot; // robot drive system
Joystick stick; // only joystick
Jaguar jag;


public:
RobotDemo(void):
myRobot(1, 3, 2, 10), // front left, rear left, front right, rear right
stick(1), //these must be initialized in the same order
jag(9)


{
myRobot.SetExpiration(0.1);
}

/**
* Drive left & right motors for 2 seconds then stop
*/
void Autonomous(void)
{
myRobot.SetSafetyEnabled(false);
myRobot.MecanumDrive_Cartesian(0.0, 0.5, 0.0, 0.0); // drive forwards half speed
Wait(2.0); // for 2 seconds
myRobot.MecanumDrive_Cartesian(0.0, 0.0, 0.5, 0.0); // spin robot
Wait(2.0); // for 2 seconds
myRobot.MecanumDrive_Cartesian(0.0, 0.0, 0.0, 0.0); // stop robot
}


/*
* Runs the motors with single stick holonomic steering.
* comment
*/
void OperatorControl(void)
{

while (IsOperatorControl());
{
myRobot.SetSafetyEnabled(true);
myRobot.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetTwist(), 0); // drive with arcade style (use right stick)
Wait(0.005); // wait for a motor update time
}
}
};

START_ROBOT_CLASS(RobotDemo);
__________________
Love, Peace, and Robot Grease
Reply With Quote
  #4   Spotlight this post!  
Unread 01-12-2012, 09:23 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Error: a timeout has been exceeded

Quote:
Originally Posted by Cody Trey View Post
the full errer reads: ERRER: A timeout has been exceeded: RobotDrive... Output not updated often enough. ...in Check() in C:/WindRiver/workspace/WPILib/MotorSafetyHelper.cpp at line 123

does any one know how to fix it. I feel like it might be something simple, but my brain is fried.

please help....
Are you seeing this error a time or two, or is it repeating in the window? Is the robot functioning?
Reply With Quote
  #5   Spotlight this post!  
Unread 01-12-2012, 09:27 PM
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Re: Error: a timeout has been exceeded

it repeats over and over in the diagnostics messages box. it funtions in autonomous but not in teleop
__________________
Love, Peace, and Robot Grease
Reply With Quote
  #6   Spotlight this post!  
Unread 01-12-2012, 09:29 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Error: a timeout has been exceeded

Quote:
Originally Posted by Cody Trey View Post
it repeats over and over in the diagnostics messages box. it funtions in autonomous but not in teleop
Saw your code after I posted. You shouldn't have a semicolon after your while statement in teleop, your code is looping doing nothing.
Reply With Quote
  #7   Spotlight this post!  
Unread 01-16-2012, 11:59 PM
makahn64 makahn64 is offline
Registered User
FRC #0256
 
Join Date: Nov 2011
Location: United States
Posts: 27
makahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these parts
Re: Error: a timeout has been exceeded

The above code looks fine to me...the brackets all balance and I do not see an out of place semicolon.

I am having the exact same problem, but only with the old CRIO. The new CRIO works fine. No idea what is causing it yet. Even happens with just the raw, unmodified, SimpleRobot template.
Reply With Quote
  #8   Spotlight this post!  
Unread 01-17-2012, 12:48 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Error: a timeout has been exceeded

Quote:
Originally Posted by makahn64 View Post
The above code looks fine to me...the brackets all balance and I do not see an out of place semicolon.
This line is definitely not fine
Quote:
while (IsOperatorControl());
Reply With Quote
  #9   Spotlight this post!  
Unread 01-17-2012, 01:09 PM
makahn64 makahn64 is offline
Registered User
FRC #0256
 
Join Date: Nov 2011
Location: United States
Posts: 27
makahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these parts
Re: Error: a timeout has been exceeded

You're right, didn't see the semi before the bracket.

Nonetheless, the problem seems to come from not turning off the robot safety. Worked for me.
Reply With Quote
  #10   Spotlight this post!  
Unread 01-17-2012, 01:54 PM
petet4 petet4 is offline
Registered User
AKA: Pete Thomas
FRC #0706 (Cyberhawks)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Waukesha, WI.
Posts: 18
petet4 is on a distinguished road
Re: Error: a timeout has been exceeded

Cody, your issue might be that the expiration time has not been set.

Use the motorsafty member GetExpiration() to see what the time is set too and the member SetExpiration(float timeout) to set a time.

See if this helps.

-pete
Reply With Quote
  #11   Spotlight this post!  
Unread 01-18-2012, 03:26 PM
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
Red face Re: Error: a timeout has been exceeded

Quote:
Originally Posted by petet4 View Post
Cody, your issue might be that the expiration time has not been set.

Use the motorsafty member GetExpiration() to see what the time is set too and the member SetExpiration(float timeout) to set a time.

See if this helps.

-pete
Yes, the error suggests the code was run even with the semicolon problem, but it expired during that command. Starting to wonder if the command based stuff is that much better.
Reply With Quote
  #12   Spotlight this post!  
Unread 01-18-2012, 04:56 PM
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Error: a timeout has been exceeded

My team had this problem last night - we declared a robotdrive, but only used it some of the time. If the trigger was down, we drove the drive motor Jaguar instances directly by calling Jaguar::Set. We assume that the RobotDrive instance didn't like that IT wasn't getting called for a period of time, even though we were in fact updating the motors.

We fixed it by adjusting our direct-set code to run through RobotDrive instead.

It looks like this isn't the same as your problem since (aside from the semicolon after the while loop) your code always calling the RobotDrive functions.

Suggestion: Maybe try RobotDrive::TankDrive or RobotDrive::ArcadeDrive just to rule out it being a problem with the RobotDrive::MecanumDrive_Cartesian function?
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 03:39 AM.

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