Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   [cRIO] Robot Drive... Output not updated often enough. (http://www.chiefdelphi.com/forums/showthread.php?t=109293)

1757 10-26-2012 03:56 PM

[cRIO] Robot Drive... Output not updated often enough.
 
1 Attachment(s)
Hello, whenever I run any code lately through any version of net beans to our robot this message is presented repeatedly. It occurs as soon as I enable the robot, and does not recognize any input from our joysticks (though the compressor does start). This all happened after I updated to netbeans 7.12. We are on image version 43 for Java. I've tried importing the code to netbeans 7.10 7.12 and 7.2 as it worked previously in 7.11. On an even more odd note, if I tell it print a line System.out.println("joystick control"); in the operator control it comes up after at least 1 of the error message. If anyone has any ideas on anything incorrect please feel free to comment. I've attached a copy of my code (it's for a t-shirt cannon robot with a motor attached to a victor that moves a wench, the cannon's air supply is released via a spike. It's a modified version of the code that worked last year and is all hooked up the same way).

Joe Ross 10-26-2012 07:01 PM

Re: [cRIO] Robot Drive... Output not updated often enough.
 
I've seen something similar when there is an exception during initialization. The exception scrolls past so fast you don't see it. Have you tried scrolling back to see if there are any error messages?

1757 11-02-2012 04:20 PM

Re: [cRIO] Robot Drive... Output not updated often enough.
 
I'm not sure if these would would count but these show up immediately after the default disabled is running.
[cRIO] task 0x25cabb0 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bd76c0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x28a1db8 (mDNS resolve) deleted: errno=0 (0) status=0 (0)

We've tried using netbeans 7.1 with the correct plugins now. Still nothing. We're not really sure what is going on. Anything in related to these errors would be helpful. Thank you very much.

1757 11-02-2012 04:28 PM

Re: [cRIO] Robot Drive... Output not updated often enough.
 
update: the
[cRIO] task 0x25cabb0 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bd76c0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x28a1db8 (mDNS resolve) deleted: errno=0 (0) status=0 (0)

messages show up upon turning on the driver station

joelg236 11-04-2012 04:36 PM

Re: [cRIO] Robot Drive... Output not updated often enough.
 
Quote:

Originally Posted by 1757 (Post 1192577)
[cRIO] task 0x25cabb0 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bd76c0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x28a1db8 (mDNS resolve) deleted: errno=0 (0) status=0 (0)

Those are standard messages, not error messages. The problem you are encountering is most likely a RobotDrive or SpeedController object that is not being given an output (Speed) often enough.

Look through your code, and try to find a loop where a motor is not being given an output. It's certainly possible that this is due to connection problems, but seeing as the problem persists every time, I would say it has something to do with your code.

I could look through your code if you posted it to github, google code or something like that.

joelg236 11-04-2012 04:44 PM

Re: [cRIO] Robot Drive... Output not updated often enough.
 
Sorry, I guess I am not observant enough, I see you posted your code.

Question: Why are you using Watchdog? It is disabled by default and its function has basically been replaced by the motor safety stuff put in in 2011 (I think that was the year).

I believe that I found the problem as well. It appears that your teleoperated code only runs once, instead of in a loop.

Try doing it like this:
Code:

while(isOperatorControl()) {
    ... Business code ...
}

Your motors need to be updated constantly to actually use the robot. If you want the functionality provided up there ^^^, look into IterativeRobot instead of SimpleRobot. It automatically loops teleopPeriodic().

Hopefully that helps.


All times are GMT -5. The time now is 09:01 AM.

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