Is this encoder error expected?

asked 2021-02-23 20:31:56 -0500

sh_ec_ks gravatar image

Hi All,

I'm working with an iRobot Create 2. When I read the encoder count. I'm able to do so without apparent error. I've used this to get an initial position estimate by combining with gyro data. However, when I try to estimate velocity from the encoder count, the signal seems pretty noisy.

I'll get maybe 10-15 values that are expected, and then a random outlier or two. For example: If I set the wheels to 100 mm/s and calculate the change of time between cycles (which also appears to agree with the sample time i've set of 0.017s), maybe 10-14 values will be within +-10 of 100mm/s, but then I'll get a one or two values that differ by +-50-100 mm/s.

Is this normal and I'll need to filter for a better estimation, or could there be a possible timing issue? The only thing that really impacts the program speed is the checksum used to initially discard corrupted packets.

edit retag flag offensive close merge delete