Close

Java and Quadrature encoders :(

A project log for Autonomous Pi bot

Autonomous Pi Bot

rlsutton1rlsutton1 03/11/2014 at 08:241 Comment

I wrote code to decode quadrature data from 2 of the 4 encoders on the Rover 5 platform, and the code works very well. But java is pausing periodically, meaning I am occasionally missing quadrature steps. I well know java is not a real time language, as it stops periodically for garbage collection.

I'm currently experiencing about 5% missed quadrature events, which for the moment I will ignore hoping that it will not impact on navigation significantly. At some point in the future I may have to move to a hardware based solution for counting quadrature events.

Discussions

George Sapkin wrote 03/11/2014 at 12:10 point
Or you could switch to a non-garbage collected language.

  Are you sure? yes | no