Go to Post Better is the enemy of good enough. - petek [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-01-2013, 15:41
JacobGH JacobGH is offline
Registered User
FRC #1849
 
Join Date: Nov 2011
Location: Bethesda, MD
Posts: 18
JacobGH is an unknown quantity at this point
Motor Safety vs. Watchdog issues

Hey guys,
Has the Watchdog module been deprecated in place of Motor Safety? In the last few days, we've had tremendous trouble with that message everyone dreads to see: "Robot Drive... Output not updated often enough." So we tried messing with the Watchdog. First we set the expiraton time to several seconds. Then I tried feeding it in my methods, and finally just disabling it alltogether (I know that's bad form and safety procedures, but we're just trying to debug right now). But the message just comes all the time and the robot refuses to move.

So do I use Motor Safey? And if so, does it work the same way?

I should also note that we get the "output not updated..." error whenever we an image processing algorithm, which I find irritating. It appears that any algorithm which takes more than about 1/10 of a second to run will create this error. Is that by design, because if so, then we can't run any interesting algorithms without freezing up the robot.
  #2   Spotlight this post!  
Unread 13-01-2013, 16:08
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: Motor Safety vs. Watchdog issues

In C++, if you call "mainDrive.SetExpiration( 1.f );" the expiration for mainDrive's motors will be increased to 1 second, given that mainDrive is an instance of RobotDrive.
  #3   Spotlight this post!  
Unread 13-01-2013, 16:23
JacobGH JacobGH is offline
Registered User
FRC #1849
 
Join Date: Nov 2011
Location: Bethesda, MD
Posts: 18
JacobGH is an unknown quantity at this point
Re: Motor Safety vs. Watchdog issues

Ok, that makes sense. So it's just a method I call on the RobotDrive object. I forgot to mention in my question that I'm using Java with the latest cRIO image, the 2013 version 46. But what you mentioned regarding your C++ code still makes sense when translating to Java, so thank you.
  #4   Spotlight this post!  
Unread 13-01-2013, 19:53
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Motor Safety vs. Watchdog issues

To answer the original question in more detail, the watchdog isn't depricated, but it isn't used by default. The Safety config isn't required, but it is on by default for the drive base. You are free to turn if off once you trust that a badly behaved loop won't force you to disable or estop the robot in panic. You can increase the timeout, as just discussed. You can also time your code to see how often you are actually updating the motors and determine if that is what you deem reasonable. Perhaps you need to speed things up or break things up.

Greg McKaskle
  #5   Spotlight this post!  
Unread 13-01-2013, 19:56
JacobGH JacobGH is offline
Registered User
FRC #1849
 
Join Date: Nov 2011
Location: Bethesda, MD
Posts: 18
JacobGH is an unknown quantity at this point
Re: Motor Safety vs. Watchdog issues

You said:
Quote:
Originally Posted by Greg McKaskle View Post
The Safety config isn't required, but it is on by default for the drive base.
Greg McKaskle
Are you referring to the safety controls that are manipulated using methods that are members of the robotDrive class? (I'm in java).
  #6   Spotlight this post!  
Unread 13-01-2013, 20:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Motor Safety vs. Watchdog issues

That may be the way it was exposed in Java. I am more familiar with LV and thought I was using generic terminology. By drive base, I meant the RobotDrive class.

I suspect that in addition to the timeout, there is also a safety disable/enable property.
  #7   Spotlight this post!  
Unread 14-01-2013, 11:17
cjlane1138 cjlane1138 is offline
Team 1138
FRC #1138 (Eagle Engineering)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 88
cjlane1138 is an unknown quantity at this point
Re: Motor Safety vs. Watchdog issues

You have to do (RobotDrive variable)->SetSafetyEnabled(false); and GetWatchdog().SetEnabled(false);

That should work. We have always had issues and doing this works perfectly every year!
__________________
Eagle Engineering 1138
  #8   Spotlight this post!  
Unread 14-01-2013, 19:49
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
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
Re: Motor Safety vs. Watchdog issues

In Java the motor safety stuff is enabled by default only for the RobotDrive class. Those messages are because you aren't updating the RobotDrive values often enough for the default timeout.

For example, if in some autonomous code you do:

drive.arcadeDrive(1, 0);
Timer.delay(1);

The 1 second delay will cause the motors to not be updated and you'll get lots of those messages.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Closed Thread


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 02:30.

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