Encoders not getting reset after Autonomous for Teleop.

Hi,
We are using the encoder cables connected to the Neverest motors and for the autonomous we are setting the DC Controller to RUN_TO_POSITION mode. We call RESET_ENCODERS at the beginning and the end of the autonomous and it seems to fairly reliable. The main issue is when we switch to the Teleop, the drive motors are messed up and they just rotate in place with the joystick. Seems like the encoders did not reset. So we tried to set the drive motor DC controllers in Teleop to run without encoders and it still does not make a difference. If we power cycle the robot after running Autonomous, Teleop drive controls have no problem. Are we missing any other setting? How do we reset the encoders after Autonomous without power cycling the robot.

Thanks
Charging Champions
Team 8660

I’m not familiar with the FTC programming, but have you tried doing a reset at the start of teleop? It doesn’t sound like the quickest way to get going, but starting a few milliseconds late is almost always better than being “messed up”.

Yes we did reset encoders and set the controller mode as “RUN_WITHOUT_ENCODERS” in TeleOp. Even forced the motor.setTargetPosition(0) at the end of Autonomous. still the drive motors are out of whack after autonomous and are rather spinning on its own axis. Independently TeleOp and Autonomous run fine.

This is a shot in the dark, but did you perhaps declare the controllers separately for autonomous vs teleop? I remember we did this a couple of years ago. This will result in two separate sets of controller objects trying to control the same physical controller. Depending on the programming model, it may either fail to properly instantiate the teleop version, or the two may fight each other.

Seeing the code would be very helpful in debugging; often the error is somewhere completely away from where you are looking.