I recently got involved with mentoring a team. We recently ran into an issue programming our autonomous that I’d like to get some direction on. I haven’t been able to find much about this online and I’m still new to programming robots so I’d like to expand my own knowledge as well.
We were creating a new
DifferentialDrive object and using it’s convenience
.arcadeDrive() method for driving during teleop, which has been working great. The past few days we’ve been working on our autonomous, but haven’t been able to get the wheels to move smoothly in autonomous. They would jerk and almost oscillate back in forth when running the simplest of commands in autonomous. However switching to teleop, they would move smoothly and as expected.
We tried calling
DifferentialDrive.arcadeDrive() with small values and got this error. We tried calling
.set() on the individual
WPI_TalonFX motors but would still see jerky wheels. We eventually found that our issue was creating a new
DifferentialDrive object via
drive = new DifferentialDrive(leftMotorControlGroup, rightMotorControlGroup). Commenting out this code and changing how we did arcade drive fixed this issue for us.
We’re able to make progress now, but I’d like to try to understand the why this was happening. We were also seeing this issue:
ERROR 1 DifferentialDrive... Output not updated often enough. We weren’t sure if this was related/if we should set motor safety to false to resolve this.
Any information/leads would be greatly appreciated!