I’m new to ROMI and PathPlanner. Using the WPI RomiReference project and the sample code in PathPlanner I have a bare bones implementation, without drivetrain feedforward or PID controllers, just the PathPlanner PPLTVController for path following.
Trying to follow a straight line path the ROMI jumps wildly forward and back. In trying to isolate the problem I simulated both wheel velocity and wheel distance measurements. Doing that, ROMI follows the path in a reasonable manner. Then I replaced simulated velocity with actual velocity measurements (using encoder rates from the encoder API). That too worked fine. If, however, I use the actual distance measurements from the encoders ROMI goes wild.
Looking carefully at the wheel encoder distance outputs it seems that updates are occurring roughly every 60ms or so – sometimes more, sometimes less. The software is updating the ROMI state (pose, velocity) using the command scheduler periodic loop, at 20ms. This “jerky” distance updating and corresponding robot pose causes the path controller to overshoot and become seriously unstable.
Questions:
- Is the output I’m seeing from the ROMI wheel encoder (~60ms updates), typical?
- Assuming it is, what is the best way to deal with it? I’m trying to work my way up from simple to complex so, before resorting to drivetrain controllers (feedforward, PID), is there some effective way to “smooth out” the wheel encoder updates?
Thanks
–jon