Work done during my internship from https://github.com/ArseneBA/ControlOdrive
All the information you need is in documentation/ergocycleS2M.pdf.
documentation/ergocycleS2M.pdf