| TheLegion |
20-01-2015 17:41 |
Downloading Java Code to CRio
Hello, we are programming a robot with Java this year and were having some trouble running the code through the CRio (on the 2013 robot). When we ran the code, the output panel in netbeans stopped at connecting FTP @10.23.53.2 and would not get any further. Here is the output :
Code:
ant -f "C:\\Users\\robot\\Documents\\FRC Java\\RobotTemplate" deploy run
init:
init:
Deleting directory C:\Users\robot\Documents\FRC Java\RobotTemplate\build
Deleting directory C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Deleting directory C:\Users\robot\Documents\FRC Java\RobotTemplate\j2meclasses
clean:
Created dir: C:\Users\robot\Documents\FRC Java\RobotTemplate\build
Compiling 1 source file to C:\Users\robot\Documents\FRC Java\RobotTemplate\build
warning: [options] source value 1.3 is obsolete and will be removed in a future release
warning: [options] target value 1.2 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
compile:
Created dir: C:\Users\robot\Documents\FRC Java\RobotTemplate\j2meclasses
preverify:
Created dir: C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Building jar: C:\Users\robot\Documents\FRC Java\RobotTemplate\suite\RobotTemplate_1.0.0.jar
jar-app:
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]
Romizer processed 96 classes and generated 4 files.
Expanding: C:\Users\robot\Documents\FRC Java\RobotTemplate\suite\RobotTemplate_1.0.0.jar into C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Moving 1 file to C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Moving 1 file to C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Moving 1 file to C:\Users\robot\Documents\FRC Java\RobotTemplate\suite
Deleting: C:\Users\robot\Documents\FRC Java\RobotTemplate\image.suite.api
Host OS: Windows 7 6.1, 6.1
Host JVM: Java HotSpot(TM) Client VM 25.25-b02
Target IP: 10.23.53.2
Network interfaces on host:
DW1501 Wireless-N WLAN Half-Mini Card: address: 10.23.53.51 netmask: 255.0.0.0 <--- on robot's subnet
Connecting FTP @10.23.53.2
Here is our test code if it helps :
Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.GenericHID;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Main extends IterativeRobot
{
Joystick leftStick;
Joystick rightStick;
RobotDrive chassis;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit()
{
leftStick = new Joystick(1);
rightStick = new Joystick(2);
chassis = new RobotDrive(1,2,3,4);
//The parameters of the method correspond to the number of motors on your robot
//The numbers after new robotdrive correspond to the pwm motor slots on your robot
}
/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic()
{
chassis.setSafetyEnabled(false);
chassis.drive(-0.5, 0.0);
Timer.delay(2.0);
chassis.drive(0.0, 0.0);
}
/**
* This function is called periodically during operator control
*/
public void teleopPeriodic()
{
// chassis.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX), driveStick.getAxis(Joystick.AxisType.kY), driveStick.getAxis(Joystick.AxisType.kZ), 0);
// chassis.holonomicDrive(leftStick.getDirectionDegrees (), leftStick.getMagnitude(), rightStick.getX(/*GenericHID.Hand.kRight)*/));
// chassis.holonomicDrive(leftStick.getMagnitude(), leftStick.getDirectionDegrees(), rightStick.getX());
chassis.setSafetyEnabled(true);
while(isOperatorControl() && isEnabled())
{
chassis.mecanumDrive_Polar(leftStick.getMagnitude(), leftStick.getDirectionDegrees(), rightStick.getTwist());
Timer.delay(0.01);
}
}
/**
* This function is called periodically during test mode
*/
public void testPeriodic()
{
}
}
|