Hi all, here with a request for assistance.
I’m trying to get a manual_stepper
rotating continuously and smoothly.
I managed to get it accelerating, cruising indefinitely, and braking on request. HOWEVER the joints between movement segments are “bumpy” (as can hopefully be seen in the plot, and the very interesting subset of data below).
start end I c a duration i_final i_next
11 113441695023 113441760705 65682 1 0 65682 65682 112292
12 113441760705 113441872997 112292 1 0 112292 112292 64000
13 113441872997 113465360997 64000 367 0 23488000 64000 64000
14 113465360997 113465424997 64000 1 0 64000 64000 79750
15 113465424997 113465568997 79750 2 -15500 144000 64250 64000
16 113465568997 113490976997 64000 397 0 25408000 64000 64000
17 113490976997 113491040997 64000 1 0 64000 64000 95750
18 113491040997 113491200997 95750 2 -31500 160000 64250 64000
19 113491200997 113514624997 64000 366 0 23424000 64000 64000
20 113514624997 113514688997 64000 1 0 64000 64000 79879
Those sharp peaks correspond to unwanted single/double steps, with irregular intervals, that are inserted between adjacent segments of the move. Those produce audible “bumps” regularly during rotation, and will stall the stepper if rotating fast enough.
I’m passing apparently sensible print_time
s to trapq_append
, but I’ve no clue how the downstream C code might be implicated.
I would really appreciate some pointers on how to appropriately time the moves with trapq_append
, generate_steps
, and trapq_finalize_moves
to get smooth motion.
Just in case, the relevant “extras” module is here: klippy/extras/manual_spinner.py · pipetting · pipettin-bot / Forks / Klipper · GitLab
Best!
N.