Go to Post My wife thought the lead singer, Ozzy Kamen was cute. Darn those rockers. - Andy Baker [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 28-01-2015, 12:30
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Remote command failed with exit status 1

Hey, guys!

We've been trying to deploy our Java code to our roboRIO from a MacBook Pro. However, every time we try, it spits out this log and won't complete:

Code:
Buildfile: /Users/324876/Documents/workspace/2015 Test/build.xml
Trying to override old definition of task classloader
clean:
   [delete] Deleting directory /Users/324876/Documents/workspace/2015 Test/build
   [delete] Deleting directory /Users/324876/Documents/workspace/2015 Test/dist
compile:
    [mkdir] Created dir: /Users/324876/Documents/workspace/2015 Test/build
     [echo] [athena-compile] Compiling src with classpath=/Users/324876/wpilib/java/current/lib/WPILib.jar:/Users/324876/wpilib/java/current/lib/NetworkTables.jar to build
    [javac] Compiling 1 source file to /Users/324876/Documents/workspace/2015 Test/build
jar:
     [echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
    [mkdir] Created dir: /Users/324876/Documents/workspace/2015 Test/dist
    [mkdir] Created dir: /Users/324876/Documents/workspace/2015 Test/build/jars
     [echo] [athena-jar] Copying jars from /Users/324876/wpilib/java/current/lib/WPILib.jar:/Users/324876/wpilib/java/current/lib/NetworkTables.jar to build/jars.
     [copy] Copying 2 files to /Users/324876/Documents/workspace/2015 Test/build/jars
      [jar] Building jar: /Users/324876/Documents/workspace/2015 Test/dist/FRCUserProgram.jar
get-target-ip:
     [echo] Trying Target: roboRIO-4301.local
     [echo] roboRIO found via mDNS
dependencies:
     [echo] roboRIO image version validated
     [echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s/4485/m/13503/l/288822-installing-java-8-on-the-roborio-using-the-frc-roborio-java-installer-java-only
  [sshexec] Connecting to roboRIO-4301.local:22
  [sshexec] cmd : test -d /usr/local/frc/JRE
deploy:
     [echo] [athena-deploy] Copying code over.
      [scp] Connecting to roboRIO-4301.local:22
      [scp] done.
  [sshexec] Connecting to roboRIO-4301.local:22
  [sshexec] cmd : killall netconsole-host
  [sshexec] killall: netconsole-host: no process killed
  [sshexec] Remote command failed with exit status 1
      [scp] Connecting to roboRIO-4301.local:22
      [scp] done.
      [scp] Connecting to roboRIO-4301.local:22
      [scp] done.
     [echo] [athena-deploy] Starting program.
  [sshexec] Connecting to roboRIO-4301.local:22
  [sshexec] cmd : . /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r;
  [sshexec] start-stop-daemon: warning: killing process 1413: No such process
BUILD SUCCESSFUL
Total time: 11 seconds
Could someone please help us figure out what we're doing wrong? Thanks!
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)

Last edited by Whippet : 28-01-2015 at 21:16. Reason: spelling
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2015, 19:57
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Remote command failed with exit status 1

No, it's sucessful. It just couldn't kill the robot code, most likely because it wasn't already running.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2015, 20:01
Joey1939's Avatar
Joey1939 Joey1939 is offline
Registered User
AKA: Joey Holliday
FRC #1939 (Kuhnigits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Kansas City, Missouri
Posts: 144
Joey1939 has a spectacular aura aboutJoey1939 has a spectacular aura aboutJoey1939 has a spectacular aura about
Re: Remote command failed with exit status 1

Quote:
Originally Posted by kinganu123 View Post
No, it's sucessful. It just couldn't kill the robot code, most likely because it wasn't already running.
To clarify, your code was successfully uploaded to the roboRIO. The error you are seeing was that it tried stop any robot code already running but didn't see any.
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2015, 21:16
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Remote command failed with exit status 1

Why does our driver station still display negative under "robot code," then? Are we having a different problem I don't know about?
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2015, 07:59
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 992
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Remote command failed with exit status 1

Quote:
Originally Posted by Whippet View Post
Why does our driver station still display negative under "robot code," then? Are we having a different problem I don't know about?
Your code is likely crashing. Are you getting any message in the DS Messages window?
Reply With Quote
  #6   Spotlight this post!  
Unread 29-01-2015, 11:08
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Remote command failed with exit status 1

I got the following message in the DS message window:

Code:
 ERROR Unhandled exception: edu.wpi.first.wpilibj.tables.TableKeyNotDefinedException: Unkown Table Key: /SmartDashboard/Forward Time at [edu.wpi.first.wpilibj.networktables2.NetworkTableNode.getDouble(NetworkTableNode.java:51), edu.wpi.first.wpilibj.networktables.NetworkTable.getNumber(NetworkTable.java:294), edu.wpi.first.wpilibj.smartdashboard.SmartDashboard.getNumber(SmartDashboard.java:144), org.usfirst.frc.team4301.robot.Robot.disabled(Robot.java:90), edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:126), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)]
Here is our code:

Code:
/* 
 * This is the experimental code for the 2015 robot.  DO NOT USE FOR COMPETITION!  
 * All code that is usable will be in  a separate project.
 */
package org.usfirst.frc.team4301.robot;


import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;


public class Robot extends SampleRobot {
    RobotDrive chassis;
    Joystick DriverStick;
    Joystick OperatorStick;
    Gyro gyro;
    Talon Lift;
    Talon Winch;

    public Robot() {
        chassis = new RobotDrive(0, 1, 2, 3);
        chassis.setExpiration(0.1);
        DriverStick = new Joystick(0);
        OperatorStick = new Joystick(1);
        gyro = new Gyro(0);
        Lift = new Talon(4);
        Winch = new Talon(5);
    }

    /**
     * Drive left & right motors for 2 seconds then stop
     */
    public void autonomous() {
        chassis.setSafetyEnabled(false);
        gyro.reset();
        while (isAutonomous() && isEnabled()) {
        	double ForwardTime = SmartDashboard.getNumber("Forward Time", 1.00);
        	double SidewaysTime = SmartDashboard.getNumber("Sideways Time", 5.00);
        	double rotation = 2.00;
        	if(Timer.getMatchTime() < ForwardTime) {
        		chassis.mecanumDrive_Cartesian(0, 0.5, rotation, gyro.getAngle());  //Drive away from driver Station
        	}
        	if(Timer.getMatchTime() < SidewaysTime + ForwardTime && Timer.getMatchTime() > ForwardTime) {
        		chassis.mecanumDrive_Cartesian(1, 0, rotation, gyro.getAngle());
        	}
        	// Check if time is less than sideways time and greater than forward time.
        	else {
        		chassis.mecanumDrive_Cartesian(0.0, 0.0, 0.0, gyro.getAngle());
        	}
        	SmartDashboard.putNumber("Timer", Timer.getMatchTime());
            SmartDashboard.putNumber("Gyro", gyro.getAngle());
        	Timer.delay(0.005); //wait for a short time so the processor doesn't get mad.
        }
        
    }

    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
        	//set x, y, and z values by squaring and multiplying by speed limiter
        	double x = DriverStick.getX() * Math.abs(DriverStick.getX()) * DriverStick.getThrottle();
        	double y = DriverStick.getY() * Math.abs(DriverStick.getY()) * DriverStick.getThrottle();
        	double z = DriverStick.getZ() * Math.abs(DriverStick.getZ()) * DriverStick.getThrottle();
            chassis.mecanumDrive_Cartesian(x, y, z, gyro.getAngle());
            if(DriverStick.getTrigger() == true) {
            	gyro.reset();
            }
            Lift.set(OperatorStick.getY());
            SmartDashboard.putNumber("Timer", Timer.getMatchTime());
            SmartDashboard.putNumber("Gyro", gyro.getAngle());
            Timer.delay(0.005);		// wait for a motor update time
        }
    }

    /**
     * Runs during test mode
     */
    public void test() {
    	
    }
    public void disabled() {
    	while(isDisabled()) {
    		gyro.reset();
    		chassis.mecanumDrive_Cartesian(0.0, 0.0, 0.0, 0.0);
    		SmartDashboard.getNumber("Forward Time");
    		SmartDashboard.getNumber("Sideways Time");
    		SmartDashboard.putNumber("Gyro", gyro.getAngle());
    		Timer.delay(0.005);
    		
    	}
    }
}
What are we doing wrong?
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)

Last edited by Whippet : 29-01-2015 at 17:52. Reason: Formatting
Reply With Quote
  #7   Spotlight this post!  
Unread 30-01-2015, 19:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Remote command failed with exit status 1

Quote:
Originally Posted by Whippet View Post
I got the following message in the DS message window:

Code:
 ERROR Unhandled exception: edu.wpi.first.wpilibj.tables.TableKeyNotDefinedException: Unkown Table Key: /SmartDashboard/Forward Time at [edu.wpi.first.wpilibj.networktables2.NetworkTableNode.getDouble(NetworkTableNode.java:51), edu.wpi.first.wpilibj.networktables.NetworkTable.getNumber(NetworkTable.java:294), edu.wpi.first.wpilibj.smartdashboard.SmartDashboard.getNumber(SmartDashboard.java:144), org.usfirst.frc.team4301.robot.Robot.disabled(Robot.java:90), edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:126), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)]
What are we doing wrong?
This is telling you that your code is crashing on line 90 because the SmartDashboard value you are getting doesn't exist. You can either surround those gets by try/catch, or add a default value like you used other places.
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 00:42.

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