Go to Post At the end of the day, and this is where many may disagree, it's about what is learnt and not about who wins. - popnbrown [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 20-01-2015, 17:41
TheLegion TheLegion is offline
Registered User
FRC #2353
 
Join Date: Jan 2015
Location: Kansas
Posts: 6
TheLegion is an unknown quantity at this point
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() 
    {
    
    }
}
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2015, 18:26
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: Downloading Java Code to CRio

Can you FTP to the robot from Windows? Have you disabled firewalls?
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2015, 19:19
TheLegion TheLegion is offline
Registered User
FRC #2353
 
Join Date: Jan 2015
Location: Kansas
Posts: 6
TheLegion is an unknown quantity at this point
Re: Downloading Java Code to CRio

Yeah we can FTP through IE and we get a small list of files and folders. And the firewall is turned off.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2015, 21:23
TheLegion TheLegion is offline
Registered User
FRC #2353
 
Join Date: Jan 2015
Location: Kansas
Posts: 6
TheLegion is an unknown quantity at this point
Re: Downloading Java Code to CRio

Never mind, we were able to fix the problem by reinstalling netbeans and re-downloading the plugins.
Thanks for the help though!
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:41.

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