allwpilib icon indicating copy to clipboard operation
allwpilib copied to clipboard

Add position delta odometry for swerve and mecanum

Open calcmogul opened this issue 2 years ago • 2 comments

Position delta odometry is more accurate than velocity odometry. Differential drive has position delta odometry, but swerve and mecanum have velocity odometry.

We didn't use position deltas originally because it didn't fit the API shape given we needed velocity kinematics for other things. Differential drive was simple enough that the position delta kinematics were written inline. The equations for position delta and velocity kinematics look the same, but the names didn't fit both. The resolution may be adding duplicates of the classes but with different names to reflect the data that goes in them.

The only modification needed in the odometry class is not using a time delta to turn the velocities into position deltas.

calcmogul avatar Mar 17 '22 01:03 calcmogul

Planning on doing this unless someone else is already on it.

connorworley avatar Apr 27 '22 01:04 connorworley

Go ahead.

calcmogul avatar Apr 27 '22 01:04 calcmogul