Resolve "read_position: encoder is broken for all encoders .... filtered encoder is broken"
requested to merge 4273-read_position-encoder-is-broken-for-all-encoders-filtered-encoder-is-broken into master
Closes #4273 (closed)
rework _get_motion
and Motion
object in order to:
-
encoder_delta
correction is not taken into account in the_set_position
value (_set_position
stay equal to last user target position) - Motion object has a new property
encoder_delta
and takes in charge the correction inmotion.target_pos
which is used to build the motion cmd passed to controllers - in
_get_motion
limits are checked taking into account the backlash but not theencoder_delta
. Also the backlash value reported in the message is given in units (not steps) - both
motion.target_pos
andmotion.delta
takes into accountbacklash
andencoder_delta
corrections (so that controllers working in RELATIVE mode apply same corrections as the ABSOLUTE mode case). Also has 2 new propertiestarget_pos_raw
anddelta_raw
which return the uncorrected values. - revert modif of issue 2463 which forces the _set_position to be initialized from the controller position (indexer) instead of the encoder position when encoder_read_mode is True
Edited by Perceval Guillou