Last year, I got odometry working on my robot using tracking wheels, and this year, I am getting into using the 2D Motion Profiling on okapi with Pathfinder, so far without odometry. I noticed on the “Async Motion Profile Controller” page of the okapi documentation a method called “getError” with the following description:
Returns the last error of the controller. This implementation always returns zero since the robot is assumed to perfectly follow the path. Subclasses can override this to be more accurate using odometry information.
From this, I have two questions, with which I would greatly appreciate some help:
- Why would I need a subclass?
- How would I go about overriding the error?