Go to Post If I had come up with a chokehold strategy, I wouldn't talk about it on Chief Delphi. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2015, 12:39
DeeWBee DeeWBee is offline
Registered User
FRC #3630
 
Join Date: Feb 2011
Location: Breck
Posts: 3
DeeWBee is an unknown quantity at this point
Question Reboot roboRio After Uploading Code [Java]

Hello!

I am programmer for Team 3630 from Breck School in Golden Valley, Minnesota. I've run into an interesting issue... I've successfully imaged the roboRio and can upload code to it from Eclipse no problem. But every time I upload code I am forced to reboot the roboRio! I'll upload the code and the DriverStation will show green across the board, but the moment I hit Enable, I magically don't have robot code and the only fix is to reboot the roboRio from the DriverStation. I must be doing something wrong because I was specifcally told I would never have to reboot the roboRio. Any help is appreciated!

Best
  #2   Spotlight this post!  
Unread 24-01-2015, 13:04
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Re: Reboot roboRio After Uploading Code [Java]

We had a similar issue last night when we try to get our code into the Rio the only thing that we could see it was that somewhere in the code there was a mistake and after it got fixed we never had that problem again.

Can you put an image of your code maybe we can help you?
  #3   Spotlight this post!  
Unread 24-01-2015, 13:16
DeeWBee DeeWBee is offline
Registered User
FRC #3630
 
Join Date: Feb 2011
Location: Breck
Posts: 3
DeeWBee is an unknown quantity at this point
Re: Reboot roboRio After Uploading Code [Java]

This code is dirt simple so I doubt it's a code issue but here you go. We've had this issue from the beginning even with sample code.


Code:
package org.usfirst.frc.team3630.robot;
//import the necessary packages for each class 
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.RobotDrive; 
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.DigitalInput; 
import edu.wpi.first.wpilibj.Talon;


/**
 * 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 {
	//Declare and name the drive train object  
	RobotDrive driveTrain; 
	
	//Declare and name the two joystick objects 
	Joystick leftStick; 
	Joystick rightStick; 
	
	//Declare and name the two front bumper objects 
	DigitalInput leftBumper; 
	DigitalInput rightBumper;
	
	//Declare and name the four motor controllers for the drive train 
	Talon frontLeft; 
	Talon rearLeft; 
	Talon frontRight;
	Talon rearRight; 
	
	
    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {
    	//Construct the two joystick objects 
    	leftStick = new Joystick(1);
    	rightStick = new Joystick(2); 
    	
    	//Construct the two front bumper objects 
    	rightBumper = new DigitalInput(0);
    	leftBumper = new DigitalInput(1); 
    	
    	//Construct the four motor controller objects 
    	frontLeft = new Talon(1);
    	rearLeft = new Talon(2);
    	frontRight = new Talon(3);
    	rearRight = new Talon(4); 
    	
    	//Construct the drive train object 
    	driveTrain = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight); 
    	
    	//Invert the right motors in the drive train 
    	driveTrain.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true);
    	driveTrain.setInvertedMotor(RobotDrive.MotorType.kRearRight, true);
    
    }

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

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
    	//Define the drive train as mecanum
    	driveTrain.mecanumDrive_Cartesian(leftStick.getX(), leftStick.getY(), rightStick.getX(), 0);
        
    	//If the right bumper is hit, stop the right motors 
    	if(rightBumper.get() == false) {
        	frontRight.set(0);
        	rearRight.set(0);
        }
    	
    	//If the left bumper is hit, stop the left motors 
    	if(leftBumper.get() == false) {
    		frontLeft.set(0);
    		rearLeft.set(0); 
    	}
    }
    
    /**
     * This function is called periodically during test mode
     */
    public void testPeriodic() {
    
    }
    
}
  #4   Spotlight this post!  
Unread 29-01-2015, 12:06
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 64
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Reboot roboRio After Uploading Code [Java]

Try opening the Riolog in eclipse, then reset and enable your code. We had similar issues due to null pointer exceptions that crashed the code running on the roboRIO. It was kind enough to print out the issue to the Riolog before dying, though.

I believe the same messages should get sent to the driver station though, I don't know if you're seeing anything there too...
  #5   Spotlight this post!  
Unread 29-01-2015, 17:44
mail929 mail929 is offline
Registered User
AKA: Liam
FRC #0111 (WildStang)
Team Role: Alumni
 
Join Date: Sep 2012
Rookie Year: 2011
Location: Chicagoland
Posts: 16
mail929 has a spectacular aura aboutmail929 has a spectacular aura about
Re: Reboot roboRio After Uploading Code [Java]

We had a similar problem with the beta. I don't remember if we found a solution but we at least discovered the using the blue reset button was much faster than doing a full reboot.
Closed Thread


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 14:10.

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