Skip to content

Resolve "read_position: encoder is broken for all encoders .... filtered encoder is broken"

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 in motion.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 the encoder_delta. Also the backlash value reported in the message is given in units (not steps)
  • both motion.target_pos and motion.delta takes into account backlash and encoder_delta corrections (so that controllers working in RELATIVE mode apply same corrections as the ABSOLUTE mode case). Also has 2 new properties target_pos_raw and delta_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

Merge request reports