motion: axis_sync_teleop_tp_to_carte_pos resets velocity/acceleration#3949
Open
is-primary-dev wants to merge 1 commit intoLinuxCNC:masterfrom
Open
motion: axis_sync_teleop_tp_to_carte_pos resets velocity/acceleration#3949is-primary-dev wants to merge 1 commit intoLinuxCNC:masterfrom
is-primary-dev wants to merge 1 commit intoLinuxCNC:masterfrom
Conversation
Without this, residual teleop_tp.curr_vel from an aborted jog can survive the FREE -> TELEOP transition. axis_sync_teleop_tp_to_carte_pos is called in two places: enabling motion from DISABLED, and entering teleop mode (e.g. after homing finishes). Both semantically represent the joint being at rest at the current cartesian position — leaving the trajectory planner's velocity and acceleration at stale non-zero values causes the first simple_tp_update_normal call after the sync to integrate one cycle of motion, drifting curr_pos away from the synced position. Two-line fix matching the function's documented intent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
axis_sync_teleop_tp_to_carte_posinsrc/emc/motion/axis.cupdatesteleop_tp.curr_posandpos_cmdto the current cartesian command but leavescurr_velandcurr_accuntouched. Both callers semantically represent "joint at rest at the current cartesian position" — enabling motion fromDISABLED, and enteringTELEOPafter homing. Leaving residual velocity in the trajectory planner letssimple_tp_update_normalintegrate one cycle of motion on the first pass after the sync, driftingcurr_posaway from the synced value. The patch zeroscurr_velandcurr_accalongside the existing position sync.Reproduction on an XYZZ setup where Z homes at
MAX_LIMIT: home all, jog Z in the minus direction, release the jog key (axis_jog_abort(immediate=0)runs with residual velocity), re-home. Pre-fix: Z lands 1–3 mm belowHOMEdepending on jog-settle timing. Post-fix: Z lands atHOMEwithin machine resolution.No upstream test harness exercises the
FREE -> TELEOPtransition after re-homing, so verification is by manual reproduction.