Open adammconway opened 3 years ago
I am currently working on a RC controller part using a microcontroller(one of the Arduino variants) and I2C back to the SBC(Nano or Pi) but the idea of calibration would be the same. From my experience, your RC transmitter can do quite a few adjustment but the main things are:
If one have access to an oscilloscope, he can fine tune the PCA9685 board to exactly replicate his RC transmitter's settings so that can save a lot of calibration efforts. The only trick is to workout some simple equations that RC transmitters generates the signals and calibrate the PCA9685's reference clock speed. Once that can be done, the car calibration process can be entirely reply on RC systems, or at least the steering.
I've made some progress and believe it would be definitely helpful if the donkeycar RC controller part can import some RC settings listed above(and solve the incorrect steering/throttle values at the same time).
Currently we don't support calibration for RC Input/output using PIGPIO, however I am not sure it is necessary. RC cars don't need calibration because they self calibrate and have trim settings. That said, if you use the trim settings to calibrate it is likely that your car will store incorrect steering and throttle values.
I suggest the following behavior: If using PIGPIO output support to the ESC (no servo driver) then automatically calibrate whenever drive mode is entered - assume that the starting state is 0/0.
@zlite