Go to Post So now that the Championship is over, how long 'till next kick off? ;) :p - Michelle Celio [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 02-06-2012, 07:57 PM
Jengles's Avatar
Jengles Jengles is offline
Registered User
FRC #4753 (Bexley Lions)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Bexley, Ohio
Posts: 45
Jengles will become famous soon enough
"Output not updated often enough" Error

Code:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick.AxisType;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.Timer;
import java.lang.Math;

public class RobotTemplate extends IterativeRobot {

         RobotDrive drive;

         Joystick leftStick;
         Joystick rightStick;

         // Left and Right Drive Motors
         Jaguar leftMotor1;
	 Jaguar leftMotor2;
         Jaguar rightMotor1;
         Jaguar rightMotor2;
 
         // Channels for Left and Right mobility motors.
         static final int leftMotorChannel1 = 1;
         static final int leftMotorChannel2 = 2;
         static final int rightMotorChannel1 = 3;
         static final int rightMotorChannel2 = 4;

         // Deadzone Variables
         static final double deadzonePercent = .05;

    public void robotInit() {
        
         //Initialize Drive Motors
	 leftMotor1=new Jaguar(leftMotorChannel1);
	 leftMotor2=new Jaguar(leftMotorChannel2);
	 rightMotor1=new Jaguar(rightMotorChannel1);
	 rightMotor2=new Jaguar(rightMotorChannel2); 

         drive = new RobotDrive(leftMotor2,leftMotor1,rightMotor2,rightMotor1);
         leftStick = new Joystick(1);
         rightStick = new Joystick(2);
    }

    public void teleopPeriodic() {
        
   	Watchdog.getInstance().feed();
        drive.tankDrive(deadzone(leftStick.getY()),deadzone(rightStick.getY()));
    }

    public double deadzone(double joyVal) {
       if (joyVal < deadzonePercent && joyVal > -deadzonePercent)
           return 0;
       else if(joyVal > deadzonePercent)
           return (joyVal/(1-deadzonePercent) - (1/(1-deadzonePercent)*deadzonePercent));
       else
           return (joyVal/(1-deadzonePercent) + (1/(1-deadzonePercent)*deadzonePercent));
    }
}
We are experiencing this problem. Our motors are running fine, though we continue to get this error, we're wondering if it's because iterative robot is checking for output and we are not giving it Joystick output fast enough.

Is there a way we can modify the delay time it requires or is the only option to set setSafteyEnabled to false?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-09-2012, 06:02 PM
Brobotics12 Brobotics12 is offline
Registered User
FRC #2872
 
Join Date: Oct 2011
Location: New York
Posts: 5
Brobotics12 is an unknown quantity at this point
Re: "Output not updated often enough" Error

Our team is having the same error. Does anyone have a solution?
Reply With Quote
  #3   Spotlight this post!  
Unread 02-09-2012, 10:04 PM
mryfrmr's Avatar
mryfrmr mryfrmr is offline
Registered User
AKA: Mary Farmer
FRC #0191 (XCATS)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: rochester
Posts: 7
mryfrmr is an unknown quantity at this point
Re: "Output not updated often enough" Error

We are also seeing this same message. Any suggestions?
Reply With Quote
  #4   Spotlight this post!  
Unread 02-09-2012, 10:22 PM
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: "Output not updated often enough" Error

First of all create a DriverStationLCD object then to lcd.updateDisplay(); or something like that but when you are going to be running the code not in live debugging, its not going to show any of those messages.

And even though your not printing anything to the driver station they still like it when you update the display...
Reply With Quote
  #5   Spotlight this post!  
Unread 02-09-2012, 10:27 PM
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: "Output not updated often enough" Error

I have seen the same error. We no longer have the problem for now. Try checking your network settings, firewall is OFF, electronics is plugged in correctly, battery is charged enough, cRIO slots are in standard order.

Try setting your watchdog to enabled and stop feeding it. The problem could be that the watchdog has nothing to feed off of. Tell me if my suggestions have helped or not.

I wish you all of the best of luck and reply if this helped or not.

Happy competition!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #6   Spotlight this post!  
Unread 02-10-2012, 01:57 AM
TravSatEE's Avatar
TravSatEE TravSatEE is offline
Spacecraft Engineer and more
FRC #2035 (Robo Rockin' Bots)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Monterey, CA
Posts: 26
TravSatEE is infamous around these partsTravSatEE is infamous around these parts
Re: "Output not updated often enough" Error

Your code looks fine to me, but a few comments:

- Using Iterative robot, there is no need to intentionally feed the watchdog in your own code, as it is done in the IterativeRobot class.

- Turning off motor safety is probably not in your team's best interests.

- Are you seeing this message once at start of teleop, at a certain point (like after moving the joystick), or constantly?

Last edited by TravSatEE : 02-10-2012 at 02:30 AM.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-10-2012, 11:11 PM
TravSatEE's Avatar
TravSatEE TravSatEE is offline
Spacecraft Engineer and more
FRC #2035 (Robo Rockin' Bots)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Monterey, CA
Posts: 26
TravSatEE is infamous around these partsTravSatEE is infamous around these parts
Re: "Output not updated often enough" Error

I experimented with this some more this afternoon and see a good workaround without compromising safety.

Edit WPILIB MotorSafety.java line 15 to be

Code:
public static final double DEFAULT_SAFETY_EXPIRATION = 0.5;
And then rebuild the WPILIB project.

The slight increase in time won't compromise the built in safety. This timeout can cause motor output to pulse, which will increase the motor temperature and you won't be running at top speeds.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-10-2012, 11:28 PM
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: "Output not updated often enough" Error

Quote:
Originally Posted by TravSatEE View Post
I experimented with this some more this afternoon and see a good workaround without compromising safety.

Edit WPILIB MotorSafety.java line 15 to be

Code:
public static final double DEFAULT_SAFETY_EXPIRATION = 0.5;
And then rebuild the WPILIB project.

The slight increase in time won't compromise the built in safety. This timeout can cause motor output to pulse, which will increase the motor temperature and you won't be running at top speeds.
You could also just do setSafetyEnabled to false...
Reply With Quote
  #9   Spotlight this post!  
Unread 02-11-2012, 02:07 AM
TravSatEE's Avatar
TravSatEE TravSatEE is offline
Spacecraft Engineer and more
FRC #2035 (Robo Rockin' Bots)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Monterey, CA
Posts: 26
TravSatEE is infamous around these partsTravSatEE is infamous around these parts
Re: "Output not updated often enough" Error

Quote:
Originally Posted by Chiller View Post
You could also just do setSafetyEnabled to false...
While this is an approach, given that the teams have not yet understood some of the inner workings of WPILIB (I don't know it all myself either), I don't think disabling safety code is the right thing to do for these teams.

What makes the RobotDrive potentially dangerous is that under some programming circumstances, the robot can drive uncontrollably from lack of providing new driving instructions. I believe its goal was to help teams avoid recreating the wheel on implementing a tank or arcade drive, but the developers threw in some safety considerations also.

Last edited by TravSatEE : 02-11-2012 at 02:10 AM.
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 08:55 AM.

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