Go to Post the bang for the buck is unparalled. Where else can $6000 change an entire group of student's lives forever? - Cory [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-01-2012, 13:31
kingkurry kingkurry is offline
Registered User
FRC #4067
 
Join Date: Jan 2012
Location: Maryland
Posts: 20
kingkurry is an unknown quantity at this point
Code Failing

We are just trying to test our robot's drive system, but we cannot get the code to run properly. Here is our 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.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Watchdog;


public class RobotTemplate extends IterativeRobot {
RobotDrive robot;
Joystick left;
Joystick right;

public void robotInit() {
robot = new RobotDrive(1,2,3,4);
left = new Joystick(1);
right = new Joystick(2);
System.out.println("RobotInit() completed.\n");
}


public void autonomousPeriodic() {

}


public void teleopPeriodic() {
robot.tankDrive(left.getThrottle(),(-1*right.getThrottle()));
System.out.println("Tank Drive");
}

}

As you can see, all we hoped to do with this was make the robot move. These are the last few lines of output we get:

[cRIO] Welcome to LabVIEW Real-Time 11.0rc14
[cRIO] task 0xec0090 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] DIO LoopTiming: 260, expecting: 261
[cRIO] edu.wpi.first.wpilibj.util.UncleanStatusException: Fatal status code detected: -1073807246
[cRIO] at edu.wpi.first.wpilibj.can.CANExceptionFactory.chec kStatus(CANExceptionFactory.java:46)
[cRIO] at edu.wpi.first.wpilibj.can.JaguarCANDriver.sendMess age(JaguarCANDriver.java:36)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.sendMessage(CANJag uar.java:574)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.updateSyncGroup(CA NJaguar.java:1349)
[cRIO] at edu.wpi.first.wpilibj.RobotDrive.setLeftRightMotor Outputs(RobotDrive.java:531)
[cRIO] at edu.wpi.first.wpilibj.RobotDrive.drive(RobotDrive. java:212)
[cRIO] at edu.wpi.first.wpilibj.RobotDrive.<init>(RobotDrive .java:119)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.robo tInit(RobotTemplate.java:34)
[cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:74)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:156)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] WARNING: Robots don't quit!
[cRIO] ---> The startCompetition() method (or methods called by it) should have handled the exception above.
[cRIO] task 0x25cabd8 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2b3c000 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x28a1760 (mDNS resolve) deleted: errno=0 (0) status=0 (0)


I noticed it said "welcome to labview." When we imaged the cRIO we selected JAVA. Is this normal?
Reply With Quote
 


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:33.

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