Go to Post Finally, a Team Update that we can all agree to! - artdutra04 [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 03-28-2016, 01:08 AM
Maxwell777's Avatar
Maxwell777 Maxwell777 is offline
Is allowed to touch stuff now
AKA: Jackson Gray
FRC #0842 (Falcon Robotics)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Phoenix, AZ
Posts: 72
Maxwell777 has a spectacular aura aboutMaxwell777 has a spectacular aura aboutMaxwell777 has a spectacular aura about
"Robot Code" won't turn green, but no errors are displayed

We were working on getting some code debugged, as we have been so far this season, and all of a sudden we started having the strangest issues deploying. We were having problems deploying code from eclipse, it kept not being able to upload to the roborio, as if we weren't connected, but on the driverstation it said that we had comms.

After a few more retrys (and for no well explained reason), we were able to deploy and upload the code, but we hit a more serious issue. Once the code is uploaded you usually have to wait a few seconds for the robot code to start up (the "Robot Code" indicator on the driverstation to go green), but in our case it simply wouldn't start. Usually this is because of an exception being thrown while our code initializes, but said exception would be put up on the driver station console, and we weren't seeing anything. Additionally, the changes that we made were small (we only changed a few constants and I think like an if statement or something; can't remember, but it was nothing that would cause the program to error out on startup) and even when we undid them it didn't fix the issue. We commited and pulled the program down to another laptop and deployed from there, but we had the same issue. When we pulled down and deployed a previous, functional revision everything deployed and started up fine.

Anyone else seen anything similar to this before? Do you know what it could be? I would say we made some sort of fatal error when we modified the program, but we're not getting any errors thrown to the console, sooooo.....? What do?
__________________
But why?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-28-2016, 07:30 AM
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,117
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: "Robot Code" won't turn green, but no errors are displayed

Never had that happen before, but this is what I would do:

1) Connect directly to the RoboRio's ethernet port, and try again.
2) If you connect to the RoboRio's USB port, are there any logs you can look at?
3) Load some basic robot test code - print "hello world" to make sure the process works.
4) Re-image the RoboRio. Seems like a fundamental problem.
5) Load some basic robot test code - print "hello world" to make sure the process works.
6) Deploy the new code.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-28-2016, 08:40 AM
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

My team had this exact same issue at competition. It turned out that we had two sensors assigned the the same port, and another assigned to a dummy address that didn't actually exist. After we set everything to its proper port, everything was fine.
__________________
Programming Captain on team 2399 for the 2016 season.
Programmer on team 2399 The Fighting Unicorns since 2014!
Engineering Inspiration Award GPR 2015
Semi-finalist Buckeye 2015 (thanks 4269 and 1987!)
Reply With Quote
  #4   Spotlight this post!  
Unread 03-28-2016, 09:40 AM
YoshiCity YoshiCity is offline
Registered User
FRC #0133
 
Join Date: Jul 2015
Location: United States
Posts: 16
YoshiCity is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

The "Robot Code" light turns red if the code stops running, for example if there is an error that causes the code to restart in tele-op, the robot will disable and the light will turn red until the code has done its thing. The only times the "Robot Code" light has never turned green for me has been when there is such an error in a section of the code that runs immediately (Robot Init). Check out that bit of code and make sure that everything that you're initializing actually exists and is in the right port.
Good luck
Reply With Quote
  #5   Spotlight this post!  
Unread 03-28-2016, 11:10 AM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: "Robot Code" won't turn green, but no errors are displayed

Another possibility is that you somehow corrupted the JVM... You could try reinstalling that.

If the issue is indeed the code, some debug print statements everywhere is also a good place to start
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #6   Spotlight this post!  
Unread 03-28-2016, 11:52 AM
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 566
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: "Robot Code" won't turn green, but no errors are displayed

Probably the fastest way to troubleshoot this is to run the robot program in the debugger, with a breakpoint at the top of robotInit(). Then single step through all of your initialization code until you get a failure.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
Reply With Quote
  #7   Spotlight this post!  
Unread 03-28-2016, 03:07 PM
ARaine ARaine is offline
Registered User
FRC #2834
 
Join Date: Feb 2016
Location: Michigan
Posts: 5
ARaine is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

I had this issue as well, and like your problem, it did not appear to be a code issue. I had originally modified my code slightly (just some constants) but the code would not start and no error message displayed. The project had been working just fine up until this point.

I found a temporary fix, which was to reboot the roboRIO either by pressing the button on the box itself or to click the "reboot roboRIO" button in the Driver Station.

After the reboot, the robot code light came on normally with the new code I had deployed. I do not know why this happens but I hope a simple reboot is a much easier fix than what you had to go through.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-29-2016, 11:16 PM
SPQLrobotics SPQLrobotics is offline
Registered User
FRC #5941
 
Join Date: Oct 2015
Location: Everett
Posts: 4
SPQLrobotics is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

We are currently dealing with the same issue! Right now the RoboRio is not recognizing it has any code uploaded. We have reinstalled the JVM and a whole host of other items. Unfortunately no luck and no more allotted time before competition this weekend. Hope inspection day sees better things for us!
Reply With Quote
  #9   Spotlight this post!  
Unread 03-29-2016, 11:47 PM
josephno1's Avatar
josephno1 josephno1 is offline
Registered User
FRC #3647
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: murica
Posts: 20
josephno1 is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

I had the same issue during the San Diego Competition.
Make sure all sensors that you are calling actually exist, it took me a while but I found that I was calling for a Sonic Sensor on Analog port 1 when it was on port 0.

I would just make a very simple program and seeing if that uploads

Code:
package org.usfirst.frc.team3647.robot;

import edu.wpi.first.wpilibj.BuiltInAccelerometer;

/**
 * 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 Robot extends IterativeRobot {

	private BuiltInAccelerometer accel = new BuiltInAccelerometer();
	
	public void robotInit() {
	
	}

	/**
	 * This function is called periodically during autonomous
	 */
	 public void autonomousInit(){
	    	
	    }
	
	public void autonomousPeriodic() {

	}

	/**
	 * This function is called periodically during operator control
	 */
	public void teleopPeriodic() {
		SmartDashboard.putData("Test", accel);
	}

	/**
	 * This function is called periodically during test mode
	 */
	public void testPeriodic() {

	}
}
__________________
Go Team 3647 Millennium Falcons!
Reply With Quote
  #10   Spotlight this post!  
Unread 03-30-2016, 10:15 AM
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: "Robot Code" won't turn green, but no errors are displayed

I would recommend looking at you initialization code. We had an issue where we were requiring a subsystem that hadn't been initialized yet (it was null), and it crashed the robot.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 03-30-2016, 10:24 AM
GreyingJay GreyingJay is offline
Robonut
AKA: Mr. Lam
FRC #2706 (Merge Robotics)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ottawa, Canada
Posts: 738
GreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond repute
Re: "Robot Code" won't turn green, but no errors are displayed

Our code uses the navX sensor. If we try to boot the RoboRio with no navX installed (because we moved it to the practice robot or vice versa), we see this problem. So it definitely could be a crash early on in the code.
Reply With Quote
  #12   Spotlight this post!  
Unread 05-23-2016, 01:19 PM
WSiggs WSiggs is offline
Pb Fabricator
FRC #4908 (Dragons)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Duxbury Massachusetts
Posts: 22
WSiggs is an unknown quantity at this point
Re: "Robot Code" won't turn green, but no errors are displayed

Probably a bit late, but we had the same exact problem a while ago. What we had to do was use bitvise ssh and connect directly to the roborio, and from there find the file with all outputs from the rio. This file (sorry I can't remember what it's called) will show all errors that happen when the code is run, and even those that aren't picked up by driverstation or the compiler. From here we saw that it was an issue with initialization of pwm ports.
Reply With Quote
  #13   Spotlight this post!  
Unread 05-23-2016, 05:13 PM
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: "Robot Code" won't turn green, but no errors are displayed

Quote:
Originally Posted by WSiggs View Post
Probably a bit late, but we had the same exact problem a while ago. What we had to do was use bitvise ssh and connect directly to the roborio, and from there find the file with all outputs from the rio. This file (sorry I can't remember what it's called) will show all errors that happen when the code is run, and even those that aren't picked up by driverstation or the compiler. From here we saw that it was an issue with initialization of pwm ports.
The file is /home/natinst/FRC_UserProgram.log I believe
tail -f via ssh is a lot more reliable than the DriverStation log (which sometimes dies or has log items out of order)
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 08:20 AM.

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