Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Netbeans using wrong target IP? (http://www.chiefdelphi.com/forums/showthread.php?t=98862)

Biolore 15-12-2011 19:08

Netbeans using wrong target IP?
 
So, the code builds, but when it runs, it gets an error at C:\Documents and settings\Sony\sunspotfrcsdk\ant\upgrade.xml:40. Along with that, I noticed that netbeans said that the target IP is 10.0.0.2, though it should be 10.35.97.2

Anyone have any similar errors or possible solutions?

Joe Ross 15-12-2011 19:11

Re: Netbeans using wrong target IP?
 
Set your team number in netbeans per the instructions.

Biolore 15-12-2011 20:32

Re: Netbeans using wrong target IP?
 
That's part of the issue. I don't know how to change the target IP that netbeans is looking for, and I also don't know where I can find instructions.

The cRIO is set to 10.35.97.2 by the imaging tool, and the computer is set to 10.35.97.5

Mark McLeod 15-12-2011 21:57

Re: Netbeans using wrong target IP?
 
Getting Started With Java

Quote:

Originally Posted by page 6
10. Select “Tools” menu, and choose the “Options” menu options, from the NetBeans menu bar.
11. Select the “Miscellaneous” tab. Then select the “FRC Configuration” tab and enter your team number into the text field. Then press OK.


Biolore 16-12-2011 10:44

Re: Netbeans using wrong target IP?
 
So... I can't check a computer running windows right now, but the mac version (or mine at least) doesn't have an "Options" sub menu under tools, or anything for that matter. (I dislike macs, but school provides them to all students).

I'll check on a laptop running xp this afternoon though.

linuxboy 16-12-2011 12:42

Re: Netbeans using wrong target IP?
 
On Mac the IP can be changed by accessing preferences, which is in the NetBeans menu (found next to the apple).

Good luck,
Oliver

Biolore 16-12-2011 17:19

Re: Netbeans using wrong target IP?
 
I got the code to download to the robot, but it didn't work quite right, and now when I try to download the fixed code, it gets stuck at

[cRIO] Welcome to LabVIEW Real-Time 8.6.1f3
[cRIO]
[cRIO] [Squak VM] Version:2011 FRC, Feb 18 2011, 15:57:21
[cRIO] FPGA Hardware GUID: 0x2eaa5e59cafla8a966853a011b61cc91
[cRIO] FPGA Software GUID: 0x2eaa5e59cafla8a966853a011b61cc91
[cRIO] Default IterativeRobot.disableInit() method... Overload me!
[cRIO] Default IterativeRobot.disableContinuous() method... Overload me!
[cRIO] Default IterativeRobot.disablePeriodic() method... Overload me!

It will get to that point and stop

EHaskins 17-12-2011 01:05

Re: Netbeans using wrong target IP?
 
That looks typical for the default code, without having been enabled by a ds.

What were you expecting?

Ether 17-12-2011 09:55

Re: Netbeans using wrong target IP?
 

Quote:

Originally Posted by Mark McLeod (Post 1091577)

I wonder why there are 2 versions on WPI.edu, both with the same revision number (Rev 0.83), but with different layouts:

http://first.wpi.edu/Images/CMS/Firs...edWithJava.pdf

http://first.wpi.edu/Images/CMS/Firs...va_for_FRC.pdf





Mark McLeod 17-12-2011 10:19

Re: Netbeans using wrong target IP?
 
I choose to link the one with the table of contents.
Although technically, I believe it to be the earlier of the two documents.

As I recall, they were actually issued in subsequent years, but the textual differences, although minor, should have occasioned a new rev. #

Somebody probably just forgot which was the latest original document.

Biolore 22-12-2011 15:08

Re: Netbeans using wrong target IP?
 
Quote:

Originally Posted by EHaskins (Post 1091799)
That looks typical for the default code, without having been enabled by a ds.

What were you expecting?

It isn't from the default code. It's code that I wrote.

EHaskins 22-12-2011 15:15

Re: Netbeans using wrong target IP?
 
Quote:

Originally Posted by Biolore (Post 1093107)
It isn't from the default code. It's code that I wrote.

If you don't have any print statements in your code or haven't enabled it from the DS, that looks right. If it made it to that point, the code is downloaded and running correctly and no exceptions have occured.

Is the robot enabled from the DS? What do you expect to be printed or happen? We probably won't be able to help anymore without seeing your code.

Biolore 22-12-2011 15:30

Re: Netbeans using wrong target IP?
 
I hope this satifies you.
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.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Solenoid;

/**
* 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 Team3597Robot extends IterativeRobot {
//Motors
RobotDrive drivetrain;


//Joysticks
Joystick xbox_controller;
Joystick Attack3;

//Buttons
static final int NUM_JOYSTICK_BUTTONS = 16;
boolean[] xbox_controllerButtonState = new boolean[(NUM_JOYSTICK_BUTTONS+1)];
boolean[] Attack3ButtonState = new boolean[(NUM_JOYSTICK_BUTTONS+1)];

//Solenoids/Pnuematics
static final int NUM_SOLENOIDS = 8;
Solenoid[] m_solenoids = new Solenoid[NUM_SOLENOIDS];

Compressor compressor = new Compressor(4,8);

int m_autoPeriodicLoops;
int m_disablePeriodicLoops;
int m_telopPeriodicLoops;

/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public Team3597Robot(){
drivetrain = new RobotDrive (1,2,3,4);
drivetrain.setInvertedMotor(RobotDrive.MotorType.k FrontLeft, false);
drivetrain.setInvertedMotor(RobotDrive.MotorType.k FrontRight, true);
drivetrain.setInvertedMotor(RobotDrive.MotorType.k RearLeft, false);
drivetrain.setInvertedMotor(RobotDrive.MotorType.k RearRight, true);


xbox_controller = new Joystick(1);
Attack3 = new Joystick(2);
int buttonNum = 1;
for (buttonNum = 1; buttonNum <=NUM_JOYSTICK_BUTTONS; buttonNum++) {
xbox_controllerButtonState[buttonNum] = false;
Attack3ButtonState[buttonNum] = false;
}

int solenoidNum = 0;
for (solenoidNum = 0; solenoidNum < NUM_SOLENOIDS; solenoidNum++) {
m_solenoids[solenoidNum] = new Solenoid(solenoidNum+1);
}

m_autoPeriodicLoops = 0;
m_disablePeriodicLoops = 0;
m_telopPeriodicLoops = 0;
};

public void robotInit() {

}

/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
Watchdog.getInstance().feed();
m_autoPeriodicLoops++;

}

/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
Watchdog.getInstance().feed();

m_telopPeriodicLoops++;

double moveValue = xbox_controller.getRawAxis(2);
double rotateValue = xbox_controller.getRawAxis(4);
double moveValue2 = Attack3.getRawAxis(2);
double moveValue3 = xbox_controller.getRawAxis(1);

// drivetrain.arcadeDrive(moveValue, rotateValue);
drivetrain.mecanumDrive_Polar(moveValue, moveValue3, rotateValue);

/*Button Mapping

X-Box Controller
Left Stick Forward/Backward- DriveTrain Move Forward/Backward
Right Stick Left/Right- DriveTrain Rotatate Left/Right
A- Send out Deployment A+B- Return Deployment
Attack3 Joystick
Up/Down- Claw Up/Down
2- Send out Deployment 2+6- Return Deployment

*/

}

}




Output when run:

init:
init:
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\j2meclass es
clean:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
Compiling 1 source file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
compile:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\j2meclass es
preverify:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Building jar: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite\Rob otMecanum2_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 111 classes and generated 4 files.
Expanding: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite\Rob otMecanum2_1.0.0.jar into C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Deleting: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\image.sui te.api
Host OS: Windows XP 5.1, 5.1
Host JVM: Java HotSpot(TM) Client VM 20.2-b06
Target IP: 10.35.97.2
Network interfaces on host:
Marvell Yukon 88E8055 PCI-E Gigabit Ethernet Controller - Packet Scheduler Miniport: address: 10.35.97.5 netmask: 255.0.0.0 <--- on robot's subnet
Connecting FTP @10.35.97.2
upgrade:
Sending local file image.suite
flashapp:
deploy:
init:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
[cRIO]
[cRIO] -> * Loading StartupDlls: debug
[cRIO] Entering debug.o StartupLibraryInit
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: MPC5200 -- Wind River Lite5200 BSP.
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 2.0/10
[cRIO] Created: Jul 29 2009, 13:41:47
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] Leaving debug.o StartupLibraryInit
[cRIO] * Loading StartupDlls: NiRioRpc
[cRIO] * Loading StartupDlls: niorbs
[cRIO] * Loading StartupDlls: NiViSrvr
[cRIO] * Loading StartupDlls: visa32
[cRIO] * Loading StartupDlls: nivissvc
[cRIO] task 0xed0c28 (PAL00fa1fe0) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 3.2 started successfully.
[cRIO] task 0xc4c0c8 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading StartupDlls: nivision
[cRIO] * Loading StartupDlls: niserial
[cRIO] * Loading StartupDlls: FRC_FPGA
[cRIO] * Loading StartupDlls: FRC_NetworkCommunication
[cRIO] task 0x1af55f0 (t2) deleted: errno=0 (0) status=0 (0)
[cRIO] FRC_NetworkCommunication was compiled from SVN revision 2258
[cRIO]
[cRIO] NI-VISA Server 4.5 started successfully.
[cRIO] task 0xe4f3f0 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
[cRIO] FPGA Hardware GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Software GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Hardware Version: 2011
[cRIO] FPGA Software Version: 2011
[cRIO] FPGA Hardware Revision: 1.5.3
[cRIO] FPGA Software Revision: 1.5.3
[cRIO] * Loading StartupDlls: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2011 FRC, Jan 6 2011, 09:47:42
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 8.6.1f3
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Feb 18 2011, 15:57:21
[cRIO] FPGA Hardware GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] FPGA Software GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] Default IterativeRobot.disabledInit() method... Overload me!
[cRIO] Default IterativeRobot.disabledContinuous() method... Overload me!

Biolore 22-12-2011 15:38

Re: Netbeans using wrong target IP?
 
Also this error comes up after I reimaged it, and then it goes to the other one

init:
init:
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Deleting directory C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\j2meclass es
clean:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
Compiling 1 source file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\build
compile:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\j2meclass es
preverify:
Created dir: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Building jar: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite\Rob otMecanum2_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 111 classes and generated 4 files.
Expanding: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite\Rob otMecanum2_1.0.0.jar into C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Moving 1 file to C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\suite
Deleting: C:\Documents and Settings\Sony\My Documents\NetBeansProjects\RobotMecanum2\image.sui te.api
Host OS: Windows XP 5.1, 5.1
Host JVM: Java HotSpot(TM) Client VM 20.2-b06
Target IP: 10.35.97.2
Network interfaces on host:
Intel(R) Wireless WiFi Link 4965AGN - Packet Scheduler Miniport: address: 169.244.215.246 netmask: 255.255.254.0
Marvell Yukon 88E8055 PCI-E Gigabit Ethernet Controller - Packet Scheduler Miniport: address: 10.35.97.5 netmask: 255.0.0.0 <--- on robot's subnet
Connecting FTP @10.35.97.2
upgrade:
Sending local file image.suite
C:\Documents and Settings\Sony\sunspotfrcsdk\build.xml:95: The following error occurred while executing this line:
C:\Documents and Settings\Sony\sunspotfrcsdk\ant\deploy.xml:35:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream. java:168)
at java.io.BufferedInputStream.read1(BufferedInputStr eam.java:256)
at java.io.BufferedInputStream.read(BufferedInputStre am.java:317)
at java.io.BufferedInputStream.fill(BufferedInputStre am.java:218)
at java.io.BufferedInputStream.read(BufferedInputStre am.java:237)
at org.apache.commons.net.telnet.TelnetInputStream.__ read(TelnetInputStream.java:114)
at org.apache.commons.net.telnet.TelnetInputStream.ru n(TelnetInputStream.java:535)
at java.lang.Thread.run(Thread.java:662)
BUILD FAILED (total time: 9 seconds)

Biolore 22-12-2011 19:08

Re: Netbeans using wrong target IP?
 
Got it working perfectly, but the cRIO got fried 10 minutes later while we were testing it. FML


All times are GMT -5. The time now is 10:43.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi