Go to Post But I suppose friendly reminders to read the manual are much better than sarcastic ones. - dtengineering [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 06-02-2013, 08:20
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Re: Robot Code Not Working

Quote:
Originally Posted by jwakeman View Post
The code looks pretty good. I like your Victor names. Did you write all of it without testing any of it? Or has this just become a problem after getting your new cRio? It's hard to tell from all that code where exactly the problem might be. You might want to try using NetConsole and add some print statements to your code to see where it is getting locked up...the "output not updated" errors suggest your code is locked up somewhere. If you are using the WPILib PIDController class there are some defects that cause task deadlocks.
This is the first time we are testing the code, as we havent had a working CRio before now.
What is this net console you talk about?
Also, what is the PIDController class?
It looks like i have some reading to do
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2013, 12:45
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Robot Code Not Working

Quote:
Originally Posted by Arrowhead View Post
This is the first time we are testing the code, as we havent had a working CRio before now.
What is this net console you talk about?
Also, what is the PIDController class?
It looks like i have some reading to do
If you haven't tested any of the code before I would recommend starting small and then adding in one piece at a time verifying that things work as expected as you go. Just comment out everything in your while(IsAutonomous()) loop and while(IsOperatorControl()) loop and then uncomment one line at a time testing each time. Another way of saying this is you should do 'unit testing' to verify each function is working as intended, then do 'integration testing' to verify all the functions/units work together correctly.

You may not need to use NetConsole since you are already sending print statements to the LCD but is here is a link to the documentation http://wpilib.screenstepslive.com/s/...ing-netconsole.

PIDController is one of the classes available in the WPILib that is used for doing closed-loop PID control. Here's the link for that http://wpilib.screenstepslive.com/s/...rs-pid-control
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2013, 15:28
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Re: Robot Code Not Working

So we tried running the simple robot template code on the robot, and it didnt run, so right now we are looking at the ribbon cable running between the CRio and the digital sidecar as the culprit.
We should be bale to get another one within the next 2 days or so.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2013, 16:26
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Re: Robot Code Not Working

So we switched out the CRio module for an older one and it now runs the simple robot code perfectly.
We then tried running our code. We disabled motor safety timers and still get errors about motors not being updated enough. When we start running the code in tele op after deploying it nothing happens. However, when we run autonomous the motors move, but dont stop, and dont seem to be doing anything specified in our code. If we then run the robot in tele op after running it in autonomous, the same motors stay on and dont reply to any user input.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2013, 16:11
kingroosevelt kingroosevelt is offline
Registered User
FRC #4243
 
Join Date: Jan 2012
Location: Charleston, SC
Posts: 2
kingroosevelt is an unknown quantity at this point
Re: Robot Code Not Working

Arrowhead,

Team 4243 has been having the exact same problem. Out of the box Simple Robot and Default Robot templates work out of the box on an 8-slot cRIO but fails with timeout errors on a 4-slot cRIO.

This is our second year and the same problem annihilated our rookie performance last year. At that time we managed to disable the timeouts but our code effectively executed at 3 Hz instead of 50 Hz resulting in pretty embarrassing performance.

Fortunately we had an 8-slot cRIO Team 342 had lent us to get some programming knowledge before last year's build season started. And, thanks to this thread, I changed out our 4-slot cRIO for the 8-slot cRIO, and the Simple Robot Template compiled and executed flawlessly!!! I repeated the experience with the Default Robot template. What a relief!!

Given all the related threads on MotorSafetyHelper timeout messages, I think it is clear WPILib is not fully compatible with the 4-slot cRIO. Not last year and not this year.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2013, 16:45
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Re: Robot Code Not Working

Oh, we fixed the problem we were having, the problem was the "O" in OperatorControl wasnt capitalized :/
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 12:56.

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