Hi,
I am controlling SunnySky M8 brushless motors with ODrive ‘INPUT_MODE_POS_FILTER’ mode.
I have found out that ‘pos_setpoint’ value is different when ‘input_pos’ is setting directly from ODrive vs serial communication.
When the ‘input_pos’ is set on ODrive directly, the ‘pos_setpoint’ reaches similar to ‘input_pos’
In [37]: odrv0.axis0.controller.input_pos = 0.306748466
In [38]: odrv0.axis0.controller.pos_setpoint
Out[38]: 0.2992599606513977
In [39]: odrv0.axis0.controller.pos_setpoint
Out[39]: 0.3064025342464447
In [40]: odrv0.axis0.controller.pos_setpoint
Out[40]: 0.306648850440979
However, when the ‘input_pos’ is set on ESP32 via serial, ‘pos_setpoint’ reaches to 0.3099 instead of 0.3067
input_pos | pos_estimate | pos_setpoint |
---|---|---|
0.306748 | 0.039581 | 0.041099 |
0.306748 | 0.149506 | 0.150467 |
0.306748 | 0.228878 | 0.229012 |
0.306748 | 0.27186 | 0.272001 |
0.306748 | 0.292816 | 0.293002 |
0.306748 | 0.30271 | 0.302635 |
0.306748 | 0.307137 | 0.306882 |
0.306748 | 0.309059 | 0.308701 |
0.306748 | 0.309566 | 0.309462 |
0.306748 | 0.309622 | 0.309777 |
0.306748 | 0.309973 | 0.3099 |
The difference is small, but I would like to know if anyone had a similar issue and know the solution to fix it.
Thanks in advance!