![]() |
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 |
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 ? |
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.
|
Re: Build succesful, but no robot code
Quote:
|
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'» |
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.
|
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); } |
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! |
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.
|
Re: Build succesful, but no robot code
Quote:
|
| All times are GMT -5. The time now is 03:20. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi