Go to Post What happens when everything becomes fully swagged out? Also, does my robot need to have collar-popping functionality to use every feature? - AlecMataloni [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 04-11-2016, 12:41
Yildirim Yildirim is offline
Registered User
FRC #6429
 
Join Date: Oct 2016
Location: Turkey
Posts: 7
Yildirim is an unknown quantity at this point
No Robot Code Driver station

We have written our code.We are using command based program. When we deploy our code it builds succesfully but on the driver station it said no robot code. I can not understand the reason and we have very few time to fix it I need a quick help pls.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-11-2016, 12:50
Logan Byers Logan Byers is offline
Roaming Mentor & Referee
no team (Team Indiana)
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 339
Logan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud ofLogan Byers has much to be proud of
Re: No Robot Code Driver station

Quote:
Originally Posted by Yildirim View Post
We have written our code.We are using command based program. When we deploy our code it builds succesfully but on the driver station it said no robot code. I can not understand the reason and we have very few time to fix it I need a quick help pls.
Look at how you initialized your classes. That is a common issue that would cause the conditions you are seeing.

Could you post or PM your code?
Reply With Quote
  #3   Spotlight this post!  
Unread 04-11-2016, 13:11
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: 305
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: No Robot Code Driver station

Sometimes crashes can happen so fast that the DS doesn't see them. Instead, start an SSH session and do
Code:
tail -f /home/lvuser/FRCUserProgram.log
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #4   Spotlight this post!  
Unread 04-11-2016, 15:17
Yildirim Yildirim is offline
Registered User
FRC #6429
 
Join Date: Oct 2016
Location: Turkey
Posts: 7
Yildirim is an unknown quantity at this point
Re: No Robot Code Driver station

Quote:
Originally Posted by Logan Byers View Post
Look at how you initialized your classes. That is a common issue that would cause the conditions you are seeing.

Could you post or PM your code?
DriveTrain(subsystem):
package org.usfirst.frc6429.NewDimension.subsystems;

import org.usfirst.frc6429.NewDimension.RobotMap;
import org.usfirst.frc6429.NewDimension.commands.*;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.VictorSP;

import edu.wpi.first.wpilibj.command.Subsystem;


/**
*
*/
public class DriveTrain extends Subsystem {

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
private final SpeedController rightFrontMotor = RobotMap.driveTrainRightFrontMotor;
private final SpeedController rightRearMotor = RobotMap.driveTrainRightRearMotor;
private final SpeedController leftFrontMotor = RobotMap.driveTrainLeftFrontMotor;
private final SpeedController leftRearMotor = RobotMap.driveTrainLeftRearMotor;
private final RobotDrive robotDrive41 = RobotMap.driveTrainRobotDrive41;

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS


// Put methods for controlling this subsystem
// here. Call these from Commands.

public SpeedController getLeftRearMotor() {
return leftRearMotor;
}

public SpeedController getLeftFrontMotor() {
return leftFrontMotor;
}

public SpeedController getRightRearMotor() {
return rightRearMotor;
}

public SpeedController getRightFrontMotor() {
return rightFrontMotor;
}

public void initDefaultCommand() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND


// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND

// Set the default command for a subsystem here.
// setDefaultCommand(new MySpecialCommand());
}

public void takeJoystickInput(Joystick Left,Joystick Right) {
robotDrive41.tankDrive(Left,Right);
}

public void stop() {
robotDrive41.drive(0,0);
}
}



Tank Drive(command):

package org.usfirst.frc6429.NewDimension.commands;

import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc6429.NewDimension.Robot;

/**
*
*/
public class TankDrive extends Command {

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
public TankDrive() {

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
requires(Robot.driveTrain);

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
}

// Called just before this Command runs the first time
protected void initialize() {
}

// Called repeatedly when this Command is scheduled to run
protected void execute() {
Robot.driveTrain.takeJoystickInput(Robot.oi.getLef tJoystick(),
Robot.oi.getRightJoystick());
}

// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
return false;
}

// Called once after isFinished returns true
protected void end() {
Robot.driveTrain.stop();
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
end();
}
}

I can not figure out what the problem is
Reply With Quote
  #5   Spotlight this post!  
Unread 05-11-2016, 11:26
mattyokan mattyokan is offline
Registered User
FRC #2989
 
Join Date: Nov 2016
Location: Minnesota
Posts: 1
mattyokan is an unknown quantity at this point
Re: No Robot Code Driver station

Quote:
Originally Posted by Yildirim View Post
DriveTrain(subsystem):
package org.usfirst.frc6429.NewDimension.subsystems;

import org.usfirst.frc6429.NewDimension.RobotMap;
import org.usfirst.frc6429.NewDimension.commands.*;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.VictorSP;

import edu.wpi.first.wpilibj.command.Subsystem;


/**
*
*/
public class DriveTrain extends Subsystem {

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
private final SpeedController rightFrontMotor = RobotMap.driveTrainRightFrontMotor;
private final SpeedController rightRearMotor = RobotMap.driveTrainRightRearMotor;
private final SpeedController leftFrontMotor = RobotMap.driveTrainLeftFrontMotor;
private final SpeedController leftRearMotor = RobotMap.driveTrainLeftRearMotor;
private final RobotDrive robotDrive41 = RobotMap.driveTrainRobotDrive41;

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS


// Put methods for controlling this subsystem
// here. Call these from Commands.

public SpeedController getLeftRearMotor() {
return leftRearMotor;
}

public SpeedController getLeftFrontMotor() {
return leftFrontMotor;
}

public SpeedController getRightRearMotor() {
return rightRearMotor;
}

public SpeedController getRightFrontMotor() {
return rightFrontMotor;
}

public void initDefaultCommand() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND


// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND

// Set the default command for a subsystem here.
// setDefaultCommand(new MySpecialCommand());
}

public void takeJoystickInput(Joystick Left,Joystick Right) {
robotDrive41.tankDrive(Left,Right);
}

public void stop() {
robotDrive41.drive(0,0);
}
}



Tank Drive(command):

package org.usfirst.frc6429.NewDimension.commands;

import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc6429.NewDimension.Robot;

/**
*
*/
public class TankDrive extends Command {

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
public TankDrive() {

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
requires(Robot.driveTrain);

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
}

// Called just before this Command runs the first time
protected void initialize() {
}

// Called repeatedly when this Command is scheduled to run
protected void execute() {
Robot.driveTrain.takeJoystickInput(Robot.oi.getLef tJoystick(),
Robot.oi.getRightJoystick());
}

// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
return false;
}

// Called once after isFinished returns true
protected void end() {
Robot.driveTrain.stop();
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
end();
}
}

I can not figure out what the problem is
Code:
Robot.oi.getLef tJoystick(),
That could be it?
Reply With Quote
  #6   Spotlight this post!  
Unread 05-11-2016, 11:43
EmileH's Avatar
EmileH EmileH is offline
it's not a water game, ok?
AKA: Emile Hamwey
FRC #1058 (PVC Pirates) & FF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 531
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: No Robot Code Driver station

The compiler should throw an error before deploying if that's the issue though.
__________________
2016-present: High School Student, FRC 1058 PVC Pirates
2016: RiverRage 20 Champions, Battle of the Bay 3 Champions

2013-2015: Middle School Student, FRC 3467 Windham Windup
Reply With Quote
  #7   Spotlight this post!  
Unread 05-11-2016, 15:01
Joey1939's Avatar
Joey1939 Joey1939 is offline
Registered User
AKA: Joey Holliday
FRC #1939 (Kuhnigits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Kansas City, Missouri
Posts: 139
Joey1939 has a spectacular aura aboutJoey1939 has a spectacular aura aboutJoey1939 has a spectacular aura about
Re: No Robot Code Driver station

This behavior means that your code is experiencing an Exception somewhere in the initialization. I would recommend connecting with net console to watch the initialization and find the bug. I have seen often that the error exception doesn't tell you the line number in your code but rather in WPILib because they catch the error. If you surround all your initialization code with your own try catch loop and print the Exception it should tell you exactly where the Exception occurred.

(One of my most common mistakes is trying to push data to the SmartDashboard in the robot constructor. For some reason you have to wait to write to SmartDashboard in robotInit, when commands call init, or a period begins.)
__________________


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 17:38.

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