Closed robberwick closed 6 months ago
tested again - driving works as before. Wheel speeds and steering still work, odometry related prints look sane.
If we're happy that this is ok, let's get it merged so that we can rebase https://github.com/thingswebuilt/osod24_firmware/pull/40 on it and merge that too (assuming we're happy with that also)
A stab at updating the stokers with the latest estimated state, using the Observer pattern.
Things of note:
Subject
andObserver
interfacesStateEstimator
implementsSubject
, maintains list of observersStoker
implementsObserver
StateEstimator
notifies all observers when new state is estimatedMOTOR_POSITION
enum, and updatedMotorSpeeds
to use itStoker
has aposition
property that it uses to pull the correct value from the new state payload when updatedI didn't go the whole hog and replace the
StateEstimator
updating with the command pattern. It seemed like unnecessary noise at this point, as this branch was already getting a bit busy.addresses #29