[cRIO] Robot Drive... Output not updated often enough.

When ever I try to run code to my cRIO the process never completes itself. We are a rookie team so most of our programmers don’t know what the problem is.

The code is:

package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Joystick;
public class RobotTemplate extends SimpleRobot
{
private RobotDrive drivetrain;
private Joystick mainStick;
public RobotTemplate()
{
drivetrain = new RobotDrive(1, 2); // create RobotDrive
mainStick = new Joystick(1); // and joysticks
}
public void autonomous() {
for (int i = 0; i < 4; i++) {
drivetrain.drive(0.5, 0.0); // drive 50% forward with 0% turn
Timer.delay(2.0); // wait 2 seconds
drivetrain.drive(0.0, 0.75); // drive 0% forward and 75% turn
}
drivetrain.drive(0.0, 0.0); // drive 0% forward, 0% turn (stop)
}
public void OperatorControl()
{
while (true && isOperatorControl() && isEnabled())
{
drivetrain.arcadeDrive(mainStick);// drive w/joysticks
Timer.delay(0.1);
}
}
}

Whenever I try to run it these are the problems that show up:

ant -f G:\RobotTemplate deploy run
clean:
Deleting directory G:\RobotTemplate\build
Created dir: G:\RobotTemplate\build
Created dir: G:\RobotTemplate\build\classes
[crio-compile] ./src, C:/Users/A/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/A/sunspotfrcsdk\lib
etworktables-crio.jar;C:/Users/A/sunspotfrcsdk\lib\wpilibj.project\dist\lib\wpilibj.jar, C:/Users/A/sunspotfrcsdk\lib\squawk.jar -> ./build/classes
Compiling 1 source file to G:\RobotTemplate\build\classes
compile:
preverify:
Created dir: G:\RobotTemplate\build\preverify
Created dir: G:\RobotTemplate\build\preverify.raw.util
[crio-preverify] ./build/classes, , C:/Users/A/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/A/sunspotfrcsdk\lib
etworktables-crio.jar;C:/Users/A/sunspotfrcsdk\lib\wpilibj.project\dist\lib\wpilibj.jar, C:/Users/A/sunspotfrcsdk\lib\squawk.jar -> ./build/preverify
Expanding: C:\Users\A\sunspotfrcsdk\lib\wpilibj.jar into G:\RobotTemplate\build\preverify
Expanding: C:\Users\A\sunspotfrcsdk\lib
etworktables-crio.jar into G:\RobotTemplate\build\preverify
Expanding: C:\Users\A\sunspotfrcsdk\lib\wpilibj.project\dist\lib\wpilibj.jar into G:\RobotTemplate\build\preverify
jar:
[crio-jar] ./build/preverify, ./resources -> ./build/app.jar
Building jar: G:\RobotTemplate\build\app.jar
suite:
Created dir: G:\RobotTemplate\build\suite
[crio-suite] ./build/app.jar -> ./build/suite/image
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] …]

Excluding compile: com.sun.squawk.Method::getParameterTypes

Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt

[Including resource: META-INF/MANIFEST.MF]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.properties]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.xml]
Romizer processed 388 classes and generated 4 files.
Expanding: G:\RobotTemplate\build\app.jar into G:\RobotTemplate\build\suite
Moving 1 file to G:\RobotTemplate\build\suite
Moving 1 file to G:\RobotTemplate\build\suite
Moving 1 file to G:\RobotTemplate\build\suite
Deleting: G:\RobotTemplate\image.suite.api
deploy:
[crio-configure] Configuration files not included in this version of the sdk
[crio-configure] Checking that crio is configured for Java
Host OS: Windows 8 6.2, 6.2
Host JVM: Java HotSpot™ Client VM 24.51-b03
Target IP: 10.49.39.2
Network interfaces on host:
Intel® Centrino® Wireless-N 2200: address: 10.49.39.64 netmask: 255.255.255.254
WARNING: Host is not on same subnet as robot. May not be able to complete all communication with robot.
Connecting FTP @10.49.39.2
[crio-deploy] ./build/suite/image.suite -> 10.49.39.2
Sending local file image.suite
run:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
Waiting for cRIO to reboot (8s)
Waiting for cRIO to reboot (9s)
Waiting for cRIO to reboot (10s)
Waiting for cRIO to reboot (11s)
[cRIO]
[cRIO] -> * Loading debug.o: debug
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: cRIO-FRC II
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 1.0/0
[cRIO] Created: May 23 2013, 16:00:09
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] * Loading nisysrpc.out: nisysrpc
[cRIO] * Loading NiRioRpc.out: NiRioRpc
[cRIO] task 0x1773ab0 (VISA Jungo Init Thread) deleted: errno=196709 (0x30065) status=-1073807360 (0xbfff0000)
[cRIO] * Loading nivissvc.out: nivissvc
[cRIO] * Loading nivision.out: nivision
[cRIO] task 0x18f5948 (Service Locator Thread 5) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 13.0 started successfully.
[cRIO] task 0x176bab0 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a1ee68 (Service Locator Thread 6) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a1ee68 (Service Locator Thread 7) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a1ee68 (Service Locator Thread 8) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x164b208 (nisysapi-mDns) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading visa32.out: visa32
[cRIO] * Loading niserial.out: niserial
[cRIO] * Loading NiFpgaLv.out: NiFpgaLv
[cRIO] * Loading FRC_FPGA_ChipObject.out: FRC_FPGA_ChipObject
[cRIO] * Loading FRC_NetworkCommunication.out: FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication version: p4-1.4.0a18
[cRIO] FPGA Hardware GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Software GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Hardware Version: 2012
[cRIO] FPGA Software Version: 2012
[cRIO] FPGA Hardware Revision: 1.6.4
[cRIO] FPGA Software Revision: 1.6.4
[cRIO] * Loading FRC_JavaVM.out: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2012 FRC, Jan 5 2012, 17:20:48
[cRIO]
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] edu.wpi.first.wpilibj.networktables2.server.ServerConnectionAdapter@b entered connection state: GOT_CONNECTION_FROM_CLIENT
[cRIO] edu.wpi.first.wpilibj.networktables2.server.ServerConnectionAdapter@b entered connection state: CONNECTED_TO_CLIENT
[cRIO] Default operatorControl() method running, consider providing your own
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.
[cRIO] Robot Drive… Output not updated often enough.

I looked over the threads on this website, but I couldn’t find anything that is relative to our problem.

Any solutions would be greatly appreciated…

Why are you delaying your operatorControl() loop?

I would remove the delay. It will cause a .1 second delay between your inputs and the robot’s reaction.

EDIT:

The other clue is the line

[cRIO] Default operatorControl() method running, consider providing your own

You have “OperatorControl()” but the correct method is “operatorControl().”

If you are not sending a value to a motor often enough you will get this error.

Also this question would be better posted in the Programming forum, more specifically in the Java section.

Also when posting code if you surround the code part of the post in code tags it will improve the readability of the code.

A delay is necessary to avoid running the CPU at 100%. New data is received every 20ms, so a delay of 0.02 is appropriate. The Motor Safety will output the Output not updated enough if it doesn’t receive an update every 100ms, so a delay of 0.1 seconds is too long.

I went thru all the things that you all suggested (thank you) but still the same problem shows up.

Any other suggestions would be appreciated…

Can you post your updated code so we can see what you changed?

Here is the new code:

package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Joystick;
public class RobotTemplate extends SimpleRobot
{
 private RobotDrive drivetrain;
 private Joystick mainStick;
 public RobotTemplate()
 {
 drivetrain = new RobotDrive(1, 2); // create RobotDrive
 mainStick = new Joystick(1); // and joysticks
 }
 public void autonomous() {
 for (int i = 0; i < 4; i++) {
 drivetrain.drive(0.5, 0.0); // drive 50% forward with 0% turn
 Timer.delay(2.0); // wait 2 seconds
 drivetrain.drive(0.0, 0.75); // drive 0% forward and 75% turn
 }
 drivetrain.drive(0.0, 0.0); // drive 0% forward, 0% turn (stop)
 }
 public void OperatorControl()
 {
 while (true && isOperatorControl() && isEnabled())
 {
 drivetrain.arcadeDrive(mainStick);// drive w/joysticks
 Timer.delay(0.02);
 }
 }
}

You didn’t rename OperatorControl() to operatorControl() as suggested.

Also, the initial part of that while condition does absolutely nothing.

Can you please explain what you mean by that.

Just that putting

true &&

is redundant.

Ok so thank you for all your help. We fixed our problem by changing our code. The new code is posted below. But now the problem is that when we turn the joystick left the robot goes right and vice-versa. Though it goes back and forth perfectly. Any input would be appreciated. When running the program no errors show up.

package edu.wpi.first.wpilibj.templates;
 
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
 
public class RobotTemplate extends SimpleRobot {
    
    RobotDrive chassis = new RobotDrive(1,2);
    Joystick mainStick = new Joystick(1);
    
    public void autonomous() {
        
    }
    
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
            double speed;
            double rot;
            speed = mainStick.getY();
            rot = mainStick.getX();
            chassis.arcadeDrive (speed, rot);
    }
    }
   
    public void test() {
       
    }
}    

How can this work with the following addresses? Did you fix this?


Host JVM: Java HotSpot™ Client VM 24.51-b03
Target IP: 10.49.39.2
Network interfaces on host:
Intel® Centrino® Wireless-N 2200: address: 10.49.39.64 netmask: 255.255.255.254
WARNING: Host is not on same subnet as robot. May not be able to complete all communication with robot.

Your computer (if you are also running the driver station) needs to be 10.49.39.5 or 10.49.39.9 and the netmask wide enough to cover all the relevant addresses, so maybe 255.255.255.0 or wider. If another computer is used as the DS you still need to fix that netmask.

HTH

I’m not sure what you mean, could you please expand. If you are talking about changing the IP address when transferring code and using the driver station we make sure of this every time. We use the classmates for the driver stations and personal laptops for running the code.

I was commenting on some of your debug output. Two computers set with the addresses 10.49.39.2:255.0.0.0 and 10.49.39.64:255.255.255.254 might have trouble talking to each other. The 10.49.39.64 machine would conclude that 10.49.39.2 is NOT on the same logical network and would forward packets destined to 10.49.39.2 to a router/gateway.

HTH

A quick fix for your turning backwardness is to invert the sign of your stick values (value * -1):


rot = -mainStick.getX();

Additionally, you could check to make sure your motors are wired correctly to the speed controllers, that your PWM cables are plugged into the controllers you want them to be plugged into, or that you set up your arcadeDrive/controllers in the right way in your code.

Thank you everybody we were able to fix our problems. We really appreciate it.

Good luck!