Go to Post a determined team can accomplish miracles. - Wayne C. [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 30-01-2017, 18:59
DybbukCode DybbukCode is offline
Registered User
FRC #4572
 
Join Date: Jan 2017
Location: Easton CT
Posts: 4
DybbukCode is an unknown quantity at this point
Exclamation Build succesful, but no robot code

This is our build console. Whenever we try to submit our code, it makes communication and the build is succesful, but the driver station still has a red light for the driver station. When I use an example program, it works. What could the problem be?





Buildfile: C:\Users\Matan\workspace\MEME-Powered\build.xml
Trying to override old definition of task classloader
clean:
[delete] Deleting directory C:\Users\Matan\workspace\MEME-Powered\build
[delete] Deleting directory C:\Users\Matan\workspace\MEME-Powered\dist
compile:
[mkdir] Created dir: C:\Users\Matan\workspace\MEME-Powered\build
[echo] [athena-compile] Compiling src with classpath=C:\Users\Matan\wpilib\java\current\lib\W PILib.jar;C:\Users\Matan\wpilib\java\current\lib\N etworkTables.jar;C:\Users\Matan\wpilib\java\curren t\lib\opencv.jar;C:\Users\Matan\wpilib\java\curren t\lib\cscore.jar to build
[javac] Compiling 11 source files to C:\Users\Matan\workspace\MEME-Powered\build
jar:
[echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
[mkdir] Created dir: C:\Users\Matan\workspace\MEME-Powered\dist
[mkdir] Created dir: C:\Users\Matan\workspace\MEME-Powered\build\jars
[echo] [athena-jar] Copying jars to build/jars.
[copy] Copying 4 files to C:\Users\Matan\workspace\MEME-Powered\build\jars
[jar] Building jar: C:\Users\Matan\workspace\MEME-Powered\dist\FRCUserProgram.jar
get-target-ip:
[echo] Finding roboRIO, please ignore any [hostinfo] error messages
[echo] Trying DNS: roboRIO-4572-FRC.lan
[echo] Trying USB: 172.22.11.2
[echo] Trying mDNS: roboRIO-4572-FRC.local
[echo] Trying Static Ethernet: 10.45.72.2
[hostinfo] Error retrieving remote host information for host:roboRIO-4572-FRC.lan.
[echo] Resolved mDNS to 10.45.72.31
[echo] roboRIO found at 10.45.72.31
dependencies:
[echo] roboRIO image version validated
[echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s...ller-java-only
[sshexec] Connecting to 10.45.72.31:22
[sshexec] cmd : test -d /usr/local/frc/JRE
deploy:
[delete] Deleting: C:\Users\Matan\wpilib\java\current\lib\native\lib\ WPI_Native_Libraries.properties
[scp] Connecting to 10.45.72.31:22
[scp] Receiving file: /usr/local/frc/lib/WPI_Native_Libraries.properties
[scp] Receiving: WPI_Native_Libraries.properties : 2598
[scp] File transfer time: 0.01 Average Rate: 519,600.0 B/s
[scp] done
[scp] Connecting to 10.45.72.31:22
[scp] Receiving file: /usr/local/frc/lib/User_Libraries.properties
[scp] Caught exception: scp: /usr/local/frc/lib/User_Libraries.properties: No such file or directory
[echo] [athena-deploy] Copying code over.
[scp] Connecting to 10.45.72.31:22
[scp] done.
[sshexec] Connecting to 10.45.72.31:22
[sshexec] cmd : ldconfig
[sshexec] Connecting to 10.45.72.31:22
[sshexec] cmd : killall -q netconsole-host || :
[delete] Deleting: C:\Users\Matan\wpilib\java\current\ant\netconsole-host.properties
[scp] Connecting to 10.45.72.31:22
[scp] Receiving file: /usr/local/frc/bin/netconsole-host.properties
[scp] Receiving: netconsole-host.properties : 134
[scp] File transfer time: 0.0 Average Rate: 33,500.0 B/s
[scp] done
[scp] Connecting to 10.45.72.31:22
[scp] done.
[echo] [athena-deploy] Starting program.
[sshexec] Connecting to 10.45.72.31:22
[sshexec] cmd : . /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r;
[sshexec] Connecting to 10.45.72.31:22
[sshexec] cmd : sync
BUILD SUCCESSFUL
Total time: 10 seconds
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2017, 19:28
ben47955 ben47955 is offline
Registered User
FRC #3996 (RIKITIK)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Canada
Posts: 14
ben47955 is an unknown quantity at this point
Re: Build succesful, but no robot code

What is the light in dashboard is red ?

Maybe that mean is a error in the code. Does the console in dashboard send error ?
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2017, 19:49
snekiam snekiam is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Programmer
 
Join Date: Dec 2015
Rookie Year: 2010
Location: SE Michigan
Posts: 98
snekiam has a spectacular aura aboutsnekiam has a spectacular aura aboutsnekiam has a spectacular aura about
Re: Build succesful, but no robot code

I've seen this happen sometimes when there is an error in your RobotInit() - maybe check there for anything out of the ordinary, like a NullPointer or something.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2017, 19:50
generaldgibson generaldgibson is offline
generaldgibson
AKA: Daniel Gibson
FRC #3397 (FRC Robolions)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2015
Location: University City
Posts: 26
generaldgibson is an unknown quantity at this point
Re: Build succesful, but no robot code

Quote:
Originally Posted by snekiam View Post
I've seen this happen sometimes when there is an error in your RobotInit() - maybe check there for anything out of the ordinary, like a NullPointer or something.
Yes, I had this happen recently, and in the drive station there was a NullPointer indicating where the code was crashing - you'll have to change the code on that line.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2017, 15:10
DybbukCode DybbukCode is offline
Registered User
FRC #4572
 
Join Date: Jan 2017
Location: Easton CT
Posts: 4
DybbukCode is an unknown quantity at this point
Exclamation Re: Build succesful, but no robot code

I looked through the cconsole in the driver station, and noticed a couple of errors. Does anyone know what they mean?

********** Robot program starting **********
ERROR 1 ERROR Unhandled exception: java.lang.RuntimeException: Code: -1029. HAL: Resource already allocated at [edu.wpi.first.wpilibj.hal.PWMJNI.initializePWMPort (Native Method), edu.wpi.first.wpilibj.PWM.<init>(PWM.java:61), edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java: 24), edu.wpi.first.wpilibj.PWMSpeedController.<init>(PW MSpeedController.java:23), edu.wpi.first.wpilibj.Spark.<init>(Spark.java:49), org.usfirst.frc.team4572.robot.subsystems.DriveSub system.<init>(DriveSubsystem.java:15), org.usfirst.frc.team4572.robot.Robot.robotInit(Rob ot.java:46), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:64), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:247)] edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:249)
Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:249): ERROR Unhandled exception: java.lang.RuntimeException: Code: -1029. HAL: Resource already allocated at [edu.wpi.first.wpilibj.hal.PWMJNI.initializePWMPort (Native Method), edu.wpi.first.wpilibj.PWM.<init>(PWM.java:61), edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java: 24), edu.wpi.first.wpilibj.PWMSpeedController.<init>(PW MSpeedController.java:23), edu.wpi.first.wpilibj.Spark.<init>(Spark.java:49), org.usfirst.frc.team4572.robot.subsystems.DriveSub system.<init>(DriveSubsystem.java:15), org.usfirst.frc.team4572.robot.Robot.robotInit(Rob ot.java:46), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:64), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:247)]
WARNING: Robots don't quit!
---> The startCompetition() method (or methods called by it) should have handled the exception above.
➔ Launching «'/usr/local/frc/JRE/bin/java' '-Djava.library.path=/usr/local/frc/lib/' '-jar' '/home/lvuser/FRCUserProgram.jar'»
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2017, 16:10
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 73
dvanvoorst is an unknown quantity at this point
Re: Build succesful, but no robot code

I believe the part that says "Resource already allocated at [edu.wpi.first.wpilibj.hal.PWMJNI.initializePWMPort " indicates that the PWM port you are trying to use has already been used to initialize another device. Make sure all of your motor controllers have a unique port number passed to them. Or post your RobotInit code here if that doesn't help.
__________________

Reply With Quote
  #7   Spotlight this post!  
Unread 01-02-2017, 16:21
DybbukCode DybbukCode is offline
Registered User
FRC #4572
 
Join Date: Jan 2017
Location: Easton CT
Posts: 4
DybbukCode is an unknown quantity at this point
Exclamation Re: Build succesful, but no robot code

Here's the robotInit code:

public void robotInit() {
chooser = new SendableChooser<Object>();
driveSubsystem = new DriveSubsystem();
gyroSystem = new GyroSystem();
ballHopperSystem = new BallHopperSystem();
ropeClimberSystem = new RopeClimberSystem();
CameraServer.getInstance().startAutomaticCapture() ;
SmartDashboard.putData("Auto mode", chooser);
robotDrive = new RobotDrive(RobotMap.FRONT_LEFT_MOTOR_PORT, RobotMap.BACK_LEFT_MOTOR_PORT, RobotMap.FRONT_RIGHT_MOTOR_PORT, RobotMap.BACK_RIGHT_MOTOR_PORT);
robotDrive.setInvertedMotor(MotorType.kFrontLeft, true);
robotDrive.setInvertedMotor(MotorType.kFrontRight, true);
robotDrive.setExpiration(0.1);
}
Reply With Quote
  #8   Spotlight this post!  
Unread 01-02-2017, 16:31
DybbukCode DybbukCode is offline
Registered User
FRC #4572
 
Join Date: Jan 2017
Location: Easton CT
Posts: 4
DybbukCode is an unknown quantity at this point
Re: Build succesful, but no robot code

UPDATE: We moved a couple things around in our doe, and we are no longer getting the same error. Now we're getting:

ERROR: Could not instantiate robot org.usfirst.frc.team4572.robot.Robot!
Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2017, 08:58
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 73
dvanvoorst is an unknown quantity at this point
Re: Build succesful, but no robot code

Look at the code in each of your subsystems and note which port number your using for each motor. My suspicion is that you'll find the same port number being used in more than one place - which will cause a runtime error during initialization.
__________________

Reply With Quote
  #10   Spotlight this post!  
Unread 05-02-2017, 10:02
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,602
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: Build succesful, but no robot code

Quote:
Originally Posted by DybbukCode View Post
UPDATE: We moved a couple things around in our doe, and we are no longer getting the same error. Now we're getting:

ERROR: Could not instantiate robot org.usfirst.frc.team4572.robot.Robot!
That means you renamed or moved your robot class and now the roborio can't find it.
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 01:28.

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