The students have been madly trying to get their swerve (dual Neos on SDS MK4i’s) working after our conventional WCD bot was mobbed by swerve bots in week 1. We are using the rev maxswerve template that was ported to python by @virtuald (thanks, Dustin!). Using some good tips found in earlier threads we were able to get our motion working well, because there was a maddening left/right swap that was turning our rotation diamonds into X’s.
The main issue now is that there is one huge problem that prevents it from driving for a long time. As you start to switch from strafe to rotating etc, it of course turns wheels, and pretty quickly it has at least one wheel with a pi offset (180°) to the target angle. This would be fine because we’re still pointing the wheel in the correct direction, but the (kinematics/chassisspeeds?) is apparently not applying a minus sign to the velocity in that case, so that wheel ends up fighting the others.
We’re using what seems to be fairly vanilla swerve code in our swerve branch, although there are still some housekeeping issues of getting rid of the relics in the template we don’t need. Has anyone else come across this pi offet causing driving problems?
Note we are still using relative encoders - just setting the wheels straight to start and resetting the sparkmax encoders for turning to zero. But it keeps track of the angle very well.