|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
[cRIO] Robot Drive... Output not updated often enough.
I got this error. According to another question on here this means that something caused the program to stop running.
No errors in code, no idea why it is happening. The code I tested (Deleted all comments, hope it is readable.) package edu.wpi.first.wpilibj.templates; //import edu.wpi.first.wpilibj.Compressor; //import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.SimpleRobot; import edu.wpi.first.wpilibj.RobotDrive; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.Joystick; //import edu.wpi.first.wpilibj.Solenoid; //import edu.wpi.first.wpilibj.Talon; //import edu.wpi.first.wpilibj.Watchdog; public class team4692robot extends SimpleRobot { RobotDrive drive = new RobotDrive(1, 2); Joystick left = new Joystick(1); Joystick right = new Joystick(2); public void autonomous() { int autotimer=0; while(true && isAutonomous() && isEnabled()) { if(autotimer<100) { drive.tankDrive(.4, -.4); } else { drive.tankDrive(0, 0); } autotimer++; Timer.delay(.005); } } /** * This function is called once each time the robot enters operator control. */ public void operatorControl() { while(true && isOperatorControl() && isEnabled()) { double leftpow=left.getY(); double rightpow=right.getY(); double powermod=.25; if(left.getTrigger()) { powermod+=.25; } if(right.getTrigger()) { powermod+=.5; } leftpow*=powermod; rightpow*=powermod; drive.tankDrive(leftpow, rightpow); Timer.delay(.005); } } public void test() { } } |
|
#2
|
||||||
|
||||||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
Use [ code] tags to make the code more readable.
Scroll up in the output window and see what is printed before the "Robot Drive... Output not updated often enough." I don't see anything immediately wrong with the code. Is this the code you were running? |
|
#3
|
||||
|
||||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
Sorry I didn't reply yesterday, internet was broken.
Spoiler for log after xyz default running messege:
Here is code: (deleted commented stuff.) (I'm fairly certain this is the same code that I posted, but I uncommented and recommented stuff so it may have changed. I was running this code. There is more complicated stuff commented out, but not to bad, just commented stuff out that wasn't actually connected to the digital sidecar/whatnot yet.) Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Joystick;
public class team4692robot extends SimpleRobot
{
RobotDrive drive = new RobotDrive(1, 2);
Joystick left = new Joystick(1);
Joystick right = new Joystick(2);
public void autonomous()
{
int autotimer=0;
while(true && isAutonomous() && isEnabled())
{
if(autotimer<100)
{
drive.tankDrive(.4, -.4);
}
else
{
drive.tankDrive(0, 0);
}
autotimer++;
Timer.delay(.005);
}
}
public void operatorControl()
{
while(true && isOperatorControl() && isEnabled())
{
double leftpow=left.getY(); double rightpow=right.getY();
double powermod=.25;
if(left.getTrigger())
{
powermod+=.25;
}
if(right.getTrigger())
{
powermod+=.5;
}
leftpow*=powermod; rightpow*=powermod;
drive.tankDrive(leftpow, rightpow);
Timer.delay(.005);
}
}
public void test()
{
}
}
|
|
#4
|
|||
|
|||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
I don't see anything wrong with the code that would cause that message to be printed. RobotDrive requires the motors to be update every 0.1 seconds (expirationTime) before the robot safety code will stop them.
Make sure that the correct project is loaded in the robot. |
|
#5
|
|||
|
|||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
How many times are you seeing the message appear in the Diagnostics window? If it is constant/appearing many times it's something to worry about. If you see it happen only once or twice when the robot is transitioning between states I wouldn't worry about it.
|
|
#6
|
||||
|
||||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
Quote:
Quote:
|
|
#7
|
||||||
|
||||||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
Just run the driver station software.
|
|
#8
|
|||
|
|||
|
Re: [cRIO] Robot Drive... Output not updated often enough.
This is a problem created by the wpilib's safety system(s)...Actually, you should just kill them. Call this function in the robotInit().
Code:
private void killSafety() {
drive.setSafetyEnabled(false);
Watchdog.getInstance().kill();
}
|
|
#9
|
||||
|
||||
|
Quote:
Code:
public void robotInit()
{
drive.setSafetyEnabled(false);
Watchdog.getInstance().kill();
}
EDIT: We appear to be having ping problems. Robot Radio and Crio are fine. other stuff is bad. (forgot what exactly was bad, but their were two things.) EDIT: Found this error: Warning <Code> 44002 occurred at Ping Results: link-bad, DS radio(.4)-bad, robot radio(.1)-bad, cRIO(.2)-bad, FMS-bad Driver Station We are attempting to switch out digital sidecars to see if that is the problem. Last edited by sthreet : 01-23-2014 at 10:45 PM. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|