Can I fix my odometry given my current encoder precision?
hello, I made a simple 2WD mobile platform to evaluate ROS navigation stack. it is made of
- the main chassis = lasercut acrylics
- wheel / motors / encoders => dfrobot double wheel kit ( https://www.dfrobot.com/product-1203.... )
- arduino uno to read encoder values (hardware interrupts) + implement PID of the motor (speed control)
- raspberry pi 3b+ to run ROS kinetics
After struggling a lot trying to tune move_base, then ACML.I stumbled upon the navigation tuning guide => http://wiki.ros.org/navigation/Tutori...
Here the author suggests to make two sanity checks on odometry. the test about linear precision/drift is OK (running towards a wall). However, the angular drift fails. see rviz screenshot below. It's obvious there's something wrong: ~30 degrees of drift is unacceptable.
Now the question is: Can i fix it with my current hardware or should I upgrade my hardware? (for instance use higher encoder resolution)
some additionnal info - wheel diameter 136mm (width 24mm) - distance between the two wheels 328mm (from the center of their 24mm thickness) - encoder resolution: specs claims 663 ticks per wheel revolution. but i measured ~653 and used that value for odom calculation - i dont need the robot to move fast. slower than walking speed is ok (my goal is to test ROS nagivation stack here)
136*math.pi=427.2566008882119 mm per rev 427.25/653=0.63mm per encoder tick... dunno if it is precise enough
My worry is that the motors and encoder seems tightly integrated together. I just don't know how to "just increase the encoder resolution by changing the encoder". So I would end up buying another motor/encoder/wheel... adjust the chassis... maybe upgrade the arduino as well since a basic Uno might not cope with additionnal data... well I could end up with an entirely robot. Besides, dfrobot sells this kits precisely for what i intend to do, so it should be more a problem of my code than hardware not precise enough...
for now, i'm betting on my own code to be broken (= i dont need to change the hardware) :D