Log in

View Full Version : Robot Code disappearing in Driver Station


Jtbillick
15-02-2015, 14:21
Hey, I'm from team 4780 and I've been having an issue making our robot drive. This is the first time my team has tried to run code from eclipse and I followed the steps on screenstepslive. The code builds successfully and when I go into the driver station the communications, joysticks, and robot code is green. When I hit enable, the robot code turns red and it gets disabled. I'm not getting any errors from anything. Can anyone tell me how i can fix this? Thanks in advance.

Arhowk
15-02-2015, 14:23
Are you sure you're not erroring out in the Riolog? Make sure the Riolog displays "Launching (bunch of wierd symbols)" to ensure you have communication. Other than that, the most likely offender would be a null pointer exception which should display on the driver station. If you're about tog get System.out.println messages, trace through your code and identify which section errors out and you might see that you forgot to initialize a motor or the like.

Jtbillick
15-02-2015, 17:34
Okay so I reconfigured the bridge and ran the program again. This time I did get errors in the riolog. 18385 can anyone help me with this?

Ben Wolsieffer
15-02-2015, 17:54
This error is usually caused by changing the package or name of the robot class after the project was created.

Make sure you build.properties file in the project folder has the correct package and Robot class name.

Jtbillick
15-02-2015, 18:01
This error is usually caused by changing the package or name of the robot class after the project was created.

Make sure you build.properties file in the project folder has the correct package and Robot class name.
What is the correct package and Robot class name? Sorry, I'm the only programmer on my team and this is my first year doing this.

Ben Wolsieffer
15-02-2015, 18:06
What is the correct package and Robot class name? Sorry, I'm the only programmer on my team and this is my first year doing this.

The correct name depends on how your project is setup. The Robot class is the one that contains the robotInit(), teleopInit(), teleopPeriodic() and other methods (assuming you are using iterative or command based). The package name is the text after the package declaration at the beginning of the Robot class.

For example, my robot class is called "Robot" and its first line is:
package org.usfirst.frc.team2084.CMonster2015;
so my build.properties file has these lines:
package=org.usfirst.frc.team2084.CMonster2015
robot.class=${package}.Robot