Filiprogrammer / AlphabotSZUCar

Remote-controlled model car with positioning system and indoor navigation.
8 stars 1 forks source link

Second encoder on Raspberry Pi #151

Closed Ezward closed 1 year ago

Ezward commented 1 year ago

The Esp32 variant's STL has been updated to include a second encoder on the right wheel. It would be great to have this same thing on the Raspberry Pi. We can then get a better estimate of orientation using the two encoders. We could also implement closed loop speed control for both motors, and using a kinematics model, create a software differential so each back wheel's target velocity is calculated to match that required by the target forward velocity and the wheel's distance from the center of rotation of the turn imparted by the steering angle.

A render or photo of the RaspberryPi build would also be useful so I can adapt the Esp32 build instructions for the RaspberryPi.

Ezward commented 1 year ago

I'm not much of a 3d modeler; I've attempted do this myself in TinkerCad, but TinkerCad is not up for the job. Duplicating and mirroring almost work, but all the non-symmetrical holes end up as filled.

Filiprogrammer commented 1 year ago

I adapted the STL file for the base plate of the Raspberry Pi variant. Since I don't have and never had an assembled Raspberry Pi build of the Alphabot, I won't write build instructions for it. I only ever had a physical version of the ESP32 variation, as it is much more efficient to use the ESP32 for this project. (In terms of power consumption and complexity) The code for the Raspberry Pi variant is also far behind and barely supports any features of the ESP32 variant. It's fair to say that the Raspberry Pi variation is no longer maintained.

Ezward commented 1 year ago

@Filiprogrammer thank you. I'll print this out and give it a try. I plan to implement the software differential and adapt DonkeyCar to run on it.