Announcement

Collapse
No announcement yet.

Sometimes robot acts randomly when switching from Auto to TeleOp

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sometimes robot acts randomly when switching from Auto to TeleOp

    The robot seems to act buggy when running an Autonomous mode and then switching to TeleOp. We run the programs one at a time, the robot acts as designed: for example, it goes forward as directed by the gamepad, but after running a quick Autonomous program, then running the TeleOp, instead of now going straight, it will go in circles, the buttons are switched around. Exit the apps and restart, then the robot TeleOp program acts as intended, no longer going in circles.

    We are worried about making autonomous programs for competition if they are going to bug out our TeleOp programs. Just wanted to report this problem. Thanks.

  • #2
    I have 2 robots, and this is happening to both of them.

    Comment


    • #3
      Originally posted by RoboticsFun View Post
      The robot seems to act buggy when running an Autonomous mode and then switching to TeleOp. We run the programs one at a time, the robot acts as designed: for example, it goes forward as directed by the gamepad, but after running a quick Autonomous program, then running the TeleOp, instead of now going straight, it will go in circles, the buttons are switched around. Exit the apps and restart, then the robot TeleOp program acts as intended, no longer going in circles.

      We are worried about making autonomous programs for competition if they are going to bug out our TeleOp programs. Just wanted to report this problem. Thanks.
      Does your Autonomous mode set the motor directions? Your Teleop program may assume that both motors directions are set to Forward and negate one of the joy stick values while your Autonomous program may explicitly set the direction of one of the motors to reverse. Your Teleop program may inherit the directions set by your Autonomous program. If you explicitly set the motor directions in the Teleop program the problem may go away.

      ...Bruce

      Comment


      • #4
        Originally posted by schaferbw View Post
        Does your Autonomous mode set the motor directions? Your Teleop program may assume that both motors directions are set to Forward and negate one of the joy stick values while your Autonomous program may explicitly set the direction of one of the motors to reverse. Your Teleop program may inherit the directions set by your Autonomous program. If you explicitly set the motor directions in the Teleop program the problem may go away.

        ...Bruce
        Thanks, we will double check those things as soon as we get a chance. I'll report back later!

        Comment


        • #5
          Thanks again, that seems to have solved the problem. We made sure to set the motor directions at the beginning of the TeleOp program, and now it is running as designed when switching from Autonomous to Teleop modes and back again.

          Comment


          • #6
            Originally posted by RoboticsFun View Post
            Thanks again, that seems to have solved the problem. We made sure to set the motor directions at the beginning of the TeleOp program, and now it is running as designed when switching from Autonomous to Teleop modes and back again.
            One other thing that has bitten my team multiple times is that we didn't always reset the "global" values for the program in the .INIT block for the TeleOp so we were expecting them to be the global value, but since we had run an Autonomous opmode they were whatever that was set to. Given that, we've created a robotInit procedure and make sure we call that from every OpMode as one of the first things, so we know what state our robot is in, before we go. Things work much more consistently now. :-)

            Comment

            Working...
            X