I am using the D5312s 330KV and the Odrive Pro. I am using the onboard encoder and I have noticed strange behaviour. I am using a 24V power supply with a cut off of 9 A.
- In Ramped Velocity Control, in the GUI the position changes extremely fast despite setting limits on velocity control.
- In Trap Trajectory on the odrivetool command line I get random oscillations. See below In
Out21: 8.57689094543457
In [22]: odrv0.axis0.controller.input_pos = 2
In [23]: odrv0.axis0.pos_estimate
Out[23]: 1.9989782571792603
In [24]: odrv0.axis0.controller.input_pos = 8
In [25]: odrv0.axis0.pos_estimate
Out[25]: 27.334962844848633
In [26]: odrv0.axis0.pos_estimate
Out[26]: 37.59014129638672
In [27]: odrv0.axis0.pos_estimate
Out[27]: -25.848230361938477
(Moving from 8 rotations to 2 worked fine but I couldnt move back to 8 without oscilliations.)
Testing later on seemed fine with large values or different directions In [49]: odrv0.axis0.controller.config.control_mode
Out[49]: 3
In [50]: odrv0.axis0.controller.config.input_mode
Out[50]: 5
In [51]: odrv0.axis0.controller.input_pos = 100
In [52]: odrv0.axis0.pos_estimate
Out[52]: 59.636112213134766
In [53]: odrv0.axis0.pos_estimate
Out[53]: 68.86073303222656
In [54]: odrv0.axis0.pos_estimate
Out[54]: 84.38475799560547
In [55]: odrv0.axis0.pos_estimate
Out[55]: 99.99917602539062
In [56]: odrv0.axis0.controller.input_pos = 0
In [57]: odrv0.axis0.pos_estimate
Out[57]: 88.72598266601562
In [58]: odrv0.axis0.pos_estimate
Out[58]: 41.794532775878906
In [59]: odrv0.axis0.pos_estimate
Out[59]: 22.347476959228516
In [60]: odrv0.axis0.pos_estimate
Out[60]: -0.0005177557468414307
In [61]: odrv0.axis0.controller.input_pos = -50
In [62]: odrv0.axis0.pos_estimate
Out[62]: -49.99970626831055
In [63]: odrv0.axis0.controller.input_pos = -25
In [64]: odrv0.axis0.pos_estimate
Out[64]: -10.368762016296387
- Small values also seem to work okay sometimes as evident but sometimes motor will stall at one value (Had to idle motor because no motion was happening)
In [88]: odrv0.axis0.pos_estimate
Out[88]: 11.359150886535645
In [89]: odrv0.axis0.controller.input_pos = 11.75
In [90]: odrv0.axis0.pos_estimate
Out[90]: 11.727397918701172
In [91]: odrv0.axis0.controller.input_pos = 11.65
In [92]: odrv0.axis0.pos_estimate
Out[92]: 11.579486846923828
In [93]: odrv0.axis0.controller.input_pos = 11.6
In [94]: odrv0.axis0.requested_state = 1
- Sometimes I get no movement at all on the CLI, will run a script to calibrate motor, harmonic compensation, encoder offset then save. Then after no error and in closed loop but no actuation:
In [113]: odrv0.axis0.requested_state = 8
In [114]: odrv0.axis0.pos_estimate
Out[114]: 11.6535062789917
In [115]: odrv0.axis0.controller.input_pos = 6.0
In [116]: dump_errors(odrv0)
axis0
active_errors: no error
disarm_reason: no error
procedure_result: ProcedureResult.SUCCESS
last_drv_fault: none
internal issues: none
In [117]: odrv0.axis0.pos_estimate
Out[117]: 11.653430938720703