Go to Post :D NASCAR is way harder than we thought. - SL8 [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 14-01-2010, 16:52
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Grabbing Output from Robot Sensors

We're trying to connect the Classmate, Dev Laptop, and Robot so we can get feedback from our sensors in WindRiver C++.

We've connected it with a setup like this: dev laptop and classmate to router, which wirelessly connects to the robot. We've also tried hooking everything up directly to an ethernet switch. Still don't work.

When we try to connect with the console, the Classmate intermittently displays "Watchdog Not Fed". The robot reaction works, but is delayed when we try the drives. The output on the console has all 0 values. Without the Dev Laptop in this network, the robot works fine.

We fed, disabled, and even tried to kill Watchdog. We've tried different laptops. It still does not work.

-1951-44U
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2010, 17:16
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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: Grabbing Output from Robot Sensors

The Watchdog not fed message means that the running program enabled the watchdog timer and is not calling the Feed() method before the expiration time runs out. If you have autonomous code that does a long Wait() you are probably running out the watchdog timer. If you have a program loop in your teleop code then you might be missing a call to Feed().

The configuration of the programming laptop and driver station shouldn't matter if they are all successfully talking to the robot.

Are you running some sample code or your own program?
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2010, 22:17
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Re: Grabbing Output from Robot Sensors

We are using our own code. There are no loops in our teleop, and we haven't used the autonomous yet. We had GetWatchdog().Feed() 's all over the teleop when we were trying to feed the watchdog.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2010, 03:06
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
Re: Grabbing Output from Robot Sensors

Wait you have no while(true) or while(IsOperatorControl()) loops?
I remember leaving out said while loop and getting the same issue.

Last edited by ranc : 15-01-2010 at 03:13.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2010, 09:41
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Re: Grabbing Output from Robot Sensors

Well, we have those loops, but we have no others. We have Feed()'s within those loops, too.

Does the line "GetWatchdog().SetExpiration(0.1);" in the initializers do anything? Can I delete this?
Reply With Quote
  #6   Spotlight this post!  
Unread 15-01-2010, 10:59
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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: Grabbing Output from Robot Sensors

Quote:
Originally Posted by 1951-44U View Post
Well, we have those loops, but we have no others. We have Feed()'s within those loops, too.

Does the line "GetWatchdog().SetExpiration(0.1);" in the initializers do anything? Can I delete this?
That sets the expiration time of the watchdog timer. That means that it must be fed within 0.1 second (100 milliseconds) before it times out and the motors stop with the "Watchdog not fed" error message.

If there are any Wait() calls in your loop that are greater than 100ms, the the watchtog will also time out.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #7   Spotlight this post!  
Unread 15-01-2010, 15:41
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Re: Grabbing Output from Robot Sensors

Can I SetExpiration at some ridiculously high number to get rid of the watchdog error?
Reply With Quote
  #8   Spotlight this post!  
Unread 15-01-2010, 16:22
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
Re: Grabbing Output from Robot Sensors

You could use GetWatchdog().SetEnabled(0) for turning it off right before your long wait and then use GetWatchdog().SetEnabled(1) for turning it back on again when you're not initializing whatever you're initializing (i'm assuming your long wait is due to setup of some component)
Reply With Quote
  #9   Spotlight this post!  
Unread 15-01-2010, 20:12
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Re: Grabbing Output from Robot Sensors

I'll try that tomorrow. But I haven't a single Wait() in the program. ._.

Can I completely delete the GetWatchdog().SetExpiration() or completely replace it with the .SetEnabled()?

Last edited by 1951-44U : 15-01-2010 at 21:48.
Reply With Quote
  #10   Spotlight this post!  
Unread 15-01-2010, 23:46
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
Re: Grabbing Output from Robot Sensors

Yes I think you could just use set enabled to turn it off
Reply With Quote
  #11   Spotlight this post!  
Unread 16-01-2010, 12:25
1951-44U's Avatar
1951-44U 1951-44U is offline
ROAR.
AKA: Phil Chang
FRC #0025 (Raider Robotix)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: NBTHS
Posts: 34
1951-44U has a spectacular aura about1951-44U has a spectacular aura about1951-44U has a spectacular aura about
Re: Grabbing Output from Robot Sensors

We tried setting the Watchdog at SetEnabled(0), but still get the same problem. We set it at 0 in the initializers, in autonomous, in the operator function, and in the operator loop. Setting SetExpiration() at an impossibly high number had no success, either.

Last edited by 1951-44U : 16-01-2010 at 12:40.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem receiving console output from cRIO Arborama Programming 7 15-02-2009 03:30
Weird output from ultrasonic and gyro Yuan Xue Lim Programming 4 11-02-2009 19:01
live input/output to/from application MarkH Programming 3 06-04-2006 01:43
Weird Output from Dashboard Port Ian W. Programming 9 06-03-2004 21:33
output from a cell phone? Ben.V.293 Electrical 6 24-12-2003 14:52


All times are GMT -5. The time now is 13:35.

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