2
This project does exactly that on an RC car. The author is a top competitor in the DIYRobocars community; it's the blue car in this video. He uses tachometry from the brushless motor, an IMU and visual odometry for localization. I don't know the code well enough to point you to any specific file.
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
esc × 52brushless-motor × 23
quadcopter × 21
arduino × 13
motor × 9
multi-rotor × 7
electronics × 6
microcontroller × 4
pwm × 4
pid × 3
raspberry-pi × 3
mobile-robot × 2
wheeled-robot × 2
servomotor × 2
current × 2
control × 1
sensors × 1
motion-planning × 1
matlab × 1
stepper-motor × 1
battery × 1
power × 1
calibration × 1
rcservo × 1
line-following × 1