No announcement yet.

Robot status is stopped. init button does nothing on driver station

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Robot status is stopped. init button does nothing on driver station

    code checks out all hardware is good, but when opmode is selected and you press init on the screen it just outputs on the bottom where telemetry is "Status: Robot is stopped" pressing init multiple times results in the same output any suggestions? we can't test our robot until we resolve this issue.
    Manufacturer: ZTE
    Model: N9130
    OS: 4.4.4
    Version: 2.35
    -PowerStackers 5029

  • #2
    Post your code here, or provide a link to your code stored elsewhere (GitHub?). If posting here, click on the 'advanced' option and use the # code tags editor option to wrap your code in code tags so we can read it better.


    • #3
      Team code here vvv
      -PowerStackers 5029


      • #4
        I think it's because you didn't call robot.init(hardwareMap) in the init() method.

        You don't assign anything to the robot variable:
        VelRobot robot;

        Then you assign the robot variable during the init function, but don't init with the hardware map.
        robot = new VelRobot(this);

        Here is one of the PushBot samples programs showing how the robot variable is assigned when declared, not during init.
        During init, the robot is actually initialized with the hardware map. Hopefully that gets it working. If not, look for errors in the log file.

        public class PushbotTeleopTank_Iterative extends OpMode{
            /* Declare OpMode members. */
            HardwarePushbot robot       = new HardwarePushbot(); // use the class created to define a Pushbot's hardware
                                                                 // could also use HardwarePushbotMatrix class.
            double          clawOffset  = 0.0 ;                  // Servo mid position
            final double    CLAW_SPEED  = 0.02 ;                 // sets rate to move servo
             * Code to run ONCE when the driver hits INIT
            public void init() {
                /* Initialize the hardware variables.
                 * The init() method of the hardware class does all the work here
                // Send telemetry message to signify robot waiting;
                telemetry.addData("Say", "Hello Driver");


        • #5
          I got the same result of robot is stopped. I checked the log with no errors found. Was there a major change to the sdk that would cause the init method to work differently?
          -PowerStackers 5029


          • #6
            You should take out the robot.init(hardwareMap); Here is our init
               public void init(){
                   motorRight = hardwareMap.dcMotor.get("right");
                   motorLeft = hardwareMap.dcMotor.get("left");
                   Sweep = hardwareMap.servo.get("sweep");
                   Cap1 = hardwareMap.dcMotor.get("sweep1");
                   Cap2 = hardwareMap.dcMotor.get("sweep2");
            I looked at your code and I do not believe you need this "robot.initializeRobot();"

            I am not sure what this is: public VelTeleop(AllianceColor allianceColor) {
            this.allianceColor = allianceColor;
            I would take this out unless this is important for your code.
            The only other thing I can think of is this part of the code
                public void init_loop() {
                    telemetry.addLine("Hi! I'm working!");
                public void start() {
            I do not believe you need either one of these, and it could affect your code.


            • #7
              We've since filled in our initializeRobot method with all the hardware mapping code we want to use, so it makes sense to have it there. Same goes for those other things, they have a reason to be there.

              But, that wasn't the problem. Turns out, we didn't have a default constructor in our opmode class! We added one and it worked just like that. Thanks for pointing us in the right direction. We're all gobsmacked that we could have missed something like that.
              Programming mentor for 5029 - Powerstackers


              • #8
                Hey no sweat. It happens to a lot of people. It has even happened to me.