Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Driver Station No Robot Code Connection Error (http://www.chiefdelphi.com/forums/showthread.php?t=154604)

BetaBlues 01-02-2017 21:32

Driver Station No Robot Code Connection Error
 
Hello everyone! We are having trouble with the FRC Driver Station. We deploy our code from Eclipse which builds fine, but then when we go to the driver station it shows red on "code connection". We cannot enable the robot to test our code. We have tried pushing older code that we know works from Github but it still isn't working. Has anyone had this problem before and what can we do?

Bkeeneykid 01-02-2017 21:35

Re: Driver Station No Robot Code Connection Error
 
This is most likely because your code is crashing directly on boot. Check the log (RioLog) and see if it has an error. If it doesn't, there's must be an issue with deploying the code. SSH into the rio and make sure that the executable is actually on the Rio.

BetaBlues 04-02-2017 14:13

Re: Driver Station No Robot Code Connection Error
 
We are using Windows 7 to talk to the roborio. What's the easiest way to use SSH on this system? Thank you!

BetaBlues 04-02-2017 15:08

Re: Driver Station No Robot Code Connection Error
 
We are able to ssh into the roborio. Where are the executable and the log file located? Thank you!

vauc2000 04-02-2017 15:10

Re: Driver Station No Robot Code Connection Error
 
One of the easiest ways to ssh into the RoboRIO would be to download PuTTY. This SSH client works on Windows, as well as other operating systems. Make sure you are connected to the RoboRIO network, and then input the robot hostname (RoboRIO-[your team number without leading zeroes]-FRC.local). For example, your hostname would be RoboRIO-5975-FRC.local.

On another note, have you renamed the Robot class? Another reason why the driver station may be providing the error of "No Robot Code" could be that you renamed the main Robot class without updating the build.properties file.

BetaBlues 04-02-2017 15:29

Re: Driver Station No Robot Code Connection Error
 
We are logged in as admin. Do we need to be logged in as root to see the Riolog and the executable? We ask a lot of questions (and appreciate the answers)

vauc2000 04-02-2017 15:42

Re: Driver Station No Robot Code Connection Error
 
You should not need to be logged in as root to see the executable, admin is fine. To ensure that the executable is in place, type the command "ls /home/lvuser" and see if a file called "FRCUserProgram.jar" (if you are using Java) is in the list of filenames outputted. If you are using c++, I assume the user program would be called FRCUserProgram or something similar, but I am not entirely sure.

To check the RioLog, the simplest way would be to look at the right side of the driver station.

BetaBlues 04-02-2017 15:43

Re: Driver Station No Robot Code Connection Error
 
Quote:

Originally Posted by vauc2000 (Post 1640373)
One of the easiest ways to ssh into the RoboRIO would be to download PuTTY. This SSH client works on Windows, as well as other operating systems. Make sure you are connected to the RoboRIO network, and then input the robot hostname (RoboRIO-[your team number without leading zeroes]-FRC.local). For example, your hostname would be RoboRIO-5975-FRC.local.

On another note, have you renamed the Robot class? Another reason why the driver station may be providing the error of "No Robot Code" could be that you renamed the main Robot class without updating the build.properties file.

So we found PuTTY. It's lovely <3. We are able to log into the RoboRio as admin. We don't know the password for root. We're using Java; how do we check the build.properties file?

vauc2000 04-02-2017 15:49

Re: Driver Station No Robot Code Connection Error
 
The build.properties file is on the top level of the package hierarchy in eclipse. It should appear under the folders labeled "build" and "dist".

BetaBlues 04-02-2017 16:03

Re: Driver Station No Robot Code Connection Error
 
Quote:

Originally Posted by vauc2000 (Post 1640399)
The build.properties file is on the top level of the package hierarchy in eclipse. It should appear under the folders labeled "build" and "dist".

Our top tabs are as follows:
Flie
Edit
Source
Refactor
Navigate
Search
Project
WPIlib
Run
Window
Help

We are confused - where do we find the package hierarchy/folders labeled "build" and "dist"? Thank you

vauc2000 04-02-2017 16:07

Re: Driver Station No Robot Code Connection Error
 
Unless you have changed your eclipse layout, you should have a tab on the lefthand side of your eclipse window labelled "Package Explorer". In that view, you can see all of your Java projects. Click on the project you want to check, and it should expand so you can now see the files and folders in the project. Check there for the build.properties file.

BetaBlues 04-02-2017 16:22

Re: Driver Station No Robot Code Connection Error
 
Quote:

Originally Posted by vauc2000 (Post 1640410)
Unless you have changed your eclipse layout, you should have a tab on the lefthand side of your eclipse window labelled "Package Explorer". In that view, you can see all of your Java projects. Click on the project you want to check, and it should expand so you can now see the files and folders in the project. Check there for the build.properties file.

Thank you so much, however it looks like that is not the problem. This is what the build.properties has -> package=org.usfirst.frc.team5975.robot
robot.class=${package}.Robot

This is what we have in our robot.java file
package org.usfirst.frc.team5975.robot;
public class Robot extends IterativeRobot

vauc2000 04-02-2017 16:49

Re: Driver Station No Robot Code Connection Error
 
Quote:

Originally Posted by BetaBlues (Post 1640415)
Thank you so much, however it looks like that is not the problem. This is what the build.properties has -> package=org.usfirst.frc.team5975.robot
robot.class=${package}.Robot

This is what we have in our robot.java file
package org.usfirst.frc.team5975.robot;
public class Robot extends IterativeRobot

Ah well, it was worth a shot. Have you tried locating the FRCUserProgram on the RoboRIO yet?

BetaBlues 04-02-2017 17:40

Re: Driver Station No Robot Code Connection Error
 
Quote:

Originally Posted by vauc2000 (Post 1640428)
Ah well, it was worth a shot. Have you tried locating the FRCUserProgram on the RoboRIO yet?

So it all turned out to be a coding problem lol, but your help was very useful!:) Thank you so much!!

Harshal 05-02-2017 20:44

Re: Driver Station No Robot Code Connection Error
 
It could be due to mapping multiple objects to the same port. For example using the same PCM port twice in the initialization of a solenoid.


All times are GMT -5. The time now is 09:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi