No announcement yet.

Autonomous not working correctly when run after telelop driving

  • Filter
  • Time
  • Show
Clear All
new posts

  • Autonomous not working correctly when run after telelop driving

    Our robot is running on Java using Android Studio. For some unknown reason if we run our autonomous program immediately after driving with teleop, it does not run as programmed. However, if we let the robot cycle through an autonomous program (any of the 4 we have programmed) and then run autonomous again, it runs perfectly as programmed. We do not know why. Any thoughts?

  • #2
    Can you give some more details about what is not working as expected. If you are using encoders and it is a problem with it not driving as expected, my first guess is that you may need to make sure you are calling STOP_AND_RESET_ENCODER during initialization.


    • #3
      To the good suggestion from FLARE , I would add: immediately after Stop_And_Reset, turn on the RunMode that your code was previously expecting. RunModes are mutually exclusive; no motion can happen while under Stop_And_Reset.


      • #4
        To the suggestions of FLARE and Westside I would add: If you are going to STOP_AND_RESET_ENCODER on a motor where absolute ticks matters (e.g. a motor you are using to control an arm in RUN_TO_POSITION mode or with your own PID control), make sure that before you start autonomous, the hardware controlled by that motor is at the location that you want to be associated with zero ticks.