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?
Announcement
Collapse
No announcement yet.
Autonomous not working correctly when run after telelop driving
Collapse
X
-
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.
-
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.
Comment
Comment