Hello Folks! This time, I am going to blog about my adventures with wheel encoding. I had a few problems (as usual) but solved it as I always do. The IR sensor I used was from Pololu, and I had to CAD out the encoder mount so that the rear wheels of my RC vehicle could be properly measured for wheel speed. I made the mistake of switching the ground with pwm so this caused a bit of confusion. Open ball differentials placed on the spur gear of the rear axle causes the left and right wheel speeds to differ when spinning freely. I initially thought it was a sensor error. I also made the rookie mistake of entering the wrong GPIO pin number to get the signal input into the ROS stack. (My vision is not that great and GPIO pins are a pain to read) I guess the key pro-tips here would be the following:

  1. Make sure you get a good idea of the effective measurement range each INDIVIDUAL sensor before taking measurements.
  2. Do not make the encoder counts too small to read. I personally started out with 1/8th readings until I realized I didn't even need this type of accuracy and went with 1/4th wheel encoder counts instead. Soldering all the wires was a bit of a pain but I managed and pulled through. Attached is a plot of the CSV file I got out of the ROS package I built to count wheel speeds. Pretty cool, right? I still need to post process it with some sort of filter to make sure the data is glitch-free.

P.S. Next blog will be how I generate ground truth data off of a professional RC car driver. Stay tuned!

Next Post Previous Post