How do I Post to the Game Q&A Forum?

Welcome to the FTC Game Q&A Forum! If this is your first time here, please refer to the Instructions for Forum Use section before posting.

Thank you!

Posts created to sell a product or service are not permitted and will be deleted!

Results 1 to 8 of 8

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

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Location
    Englewood,Ohio
    Posts
    5

    Exclamation 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

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Carol Stream, IL
    Posts
    161
    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. #3
    Junior Member
    Join Date
    Sep 2011
    Location
    Englewood,Ohio
    Posts
    5
    -PowerStackers 5029

  4. #4
    Member
    Join Date
    Nov 2010
    Location
    Victoria, BC, Canada
    Posts
    46
    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.

    Code:
    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
         */
        @Override
        public void init() {
            /* Initialize the hardware variables.
             * The init() method of the hardware class does all the work here
             */
            robot.init(hardwareMap);
    
            // Send telemetry message to signify robot waiting;
            telemetry.addData("Say", "Hello Driver");

  5. #5
    Junior Member
    Join Date
    Sep 2011
    Location
    Englewood,Ohio
    Posts
    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. #6
    Member
    Join Date
    Sep 2015
    Location
    Battle Ground
    Posts
    88
    You should take out the robot.init(hardwareMap); Here is our init
    Code:
        @Override
       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");
           Cap2.setDirection(DcMotor.Direction.REVERSE);
    motorLeft.setDirection(DcMotor.Direction.REVERSE);
       }
    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
    Code:
        @Override
        public void init_loop() {
            telemetry.addLine("Hi! I'm working!");
        }
    
    
      
        @Override
        public void start() {
            runtime.reset();
        }
    I do not believe you need either one of these, and it could affect your code.

  7. #7
    Junior Member
    Join Date
    Aug 2015
    Location
    Dayton, OH
    Posts
    4
    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.

  8. #8
    Member
    Join Date
    Sep 2015
    Location
    Battle Ground
    Posts
    88
    Hey no sweat. It happens to a lot of people. It has even happened to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •