home(calibrate=): forced end-stop referencing on the waldoctl ABC; StatusBuffer/loop_stats/homing-progress conformance - #34
Merged
Merged
Conversation
calibrate() always runs the firmware's referencing sequence (each joint seeks its limit switch to re-derive joint zero), even when the robot already reports itself referenced. home() keeps its existing semantics: a planned, collision-checked return to standby, falling back to the referencing sequence only on an uncalibrated robot. This matches the industrial mastering/calibration-vs-home-pose split and aligns parol6 with par6's calibrate behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158QrPR5eVhd31AvFpxJKr6
…oop_stats conform to waldoctl home(calibrate=True) always runs the firmware referencing sequence; plain home() keeps its fast-path once referenced. The flag lives on the waldoctl RobotClient ABC rather than a backend-only command. StatusBuffer now satisfies waldoctl's Protocol: `enabled` is broadcast from ControllerState.enabled, and the members parol6 has no data for (torques, warnings, link_health, freedrive, mode) hold their documented empty values. Homing progress is real: HomeCommand publishes its step and the per-joint homed bits ride the status wire, so StatusBuffer.homing carries active, sequence_step, and one (HomingJointState, HomingPhase) pair per joint — the enum shape the waldoctl Homing mirror expects — rebuilt only on change and empty while idle. loop_stats() returns waldoctl's LoopStatsResult, with p50/p90 periods computed by the timer. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158QrPR5eVhd31AvFpxJKr6
…ller The published homing step is derived from the live HomeCommand (any cancel path clears action_current), so a stop, e-stop, jog, or reconnect mid- referencing no longer leaves homing reporting active. HomeCommand writes its HomeState value once per tick instead of scattered literals. A hardware e-stop press now sets enabled=False like the digital one, so the status flag and motion gating agree with the physical switch. StatusCache scans Homed_in once for both the aggregate homed flag and the per-joint bits (list-backed, no numpy scalar boxing on the 100Hz path); the client compares the decoded bit list before rebuilding the homing view. loop_stats() unpacks the struct instead of copying fields by hand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158QrPR5eVhd31AvFpxJKr6
3 tasks
Merged
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.
home()gains acalibrateflag, declared on the waldoctlRobotClientABC (Jepson2k/waldoctlfeat/calibrate) and implemented here:home()runs the firmware's end-stop referencing sequence — each joint seeks its limit switch — and ends at the home position. Unchanged behavior.home()is a planned, collision-checked return to the home position (the existing fast-path).home(calibrate=True)re-runs the referencing sequence instead.This is the industrial calibrate-vs-home split (KUKA "mastering", ABB "calibration", with "home" as a named pose) and covers the forced-re-reference need behind #33 without changing
home()'s default. The referencing sequence is firmware-driven and ignores the collision world; the docstrings say so.Also in this PR — the
RobotClientconformance gaps that CI'styhas been blind to because waldoctl shipped withoutpy.typed(the waldoctl branch adds the marker):StatusBuffernow satisfies waldoctl's Protocol:enabledis broadcast on the wire fromControllerState.enabled(the controller-accepts-motion flag), and the members parol6 has no data for (torques,torques_ext,warnings,link_health,homing,freedrive,mode) hold their documented empty values.loop_stats()returns waldoctl'sLoopStatsResult; the loop timer now also computes p50/p90 periods, and the fieldbus/RT fields report 0/False.HomeCommandpublishes its step (signalling → waiting for the firmware to clear the homed bits → waiting for every joint) and the per-joint homed bits ride the status wire, soStatusBuffer.homingcarriesactive,sequence_step, and one(HomingJointState, HomingPhase)enum pair per joint — the shape Waldo Commander's status consumer already mirrors for par6. The dict view is rebuilt only when the step or bits change and is empty while idle.Wire compatibility:
HomeCmd.calibrateand the new trailing status fields (enabled,homing_step,joints_homed) are defaulted, so older clients and status producers keep working.Tests: a planner unit test pins the contract (
HOME(calibrate=True)yields an InlineSegment even when referenced); the integration test driveshome(calibrate=True)through the real client/server path and asserts the firmware drops the homed flag mid-sequence — which a substituted planned return move never does — and thathomingreports SEEKING joints while it runs and is empty afterwards.🤖 Generated with Claude Code
https://claude.ai/code/session_0158QrPR5eVhd31AvFpxJKr6