Closed ChainReaction12586 closed 2 years ago
I refactored odometry to use the LocalizationAlgorithm. The LocalizationAlgorithm interface requires methods: double getXPos() double getYPos() double getRot() void setPos(double x, double y, double rot)
I also Split Odometry into ThreeWheelOdometry and IMUOdometry
Suggestion:
Create a Navagational interface like this: Interface PositioningSystem double getXPos() double getYPos() double getRot() void setPos(double x, double y, double rot)
Update OdometryGlobalPosition algorithm file to implement the Positing System interface
Refactor OdometryDriveSystem to take a object implementing the PositioningSystem interface. This technique is called dependency injection and makes code more flexible. This will also open the door to reuse the OdometryDrivetrain in case we choose to change positing algorithms.