Wire per-sample locomotion mode classification; add CSV inspector - #33
Closed
CatYang3 wants to merge 1 commit into
Closed
Wire per-sample locomotion mode classification; add CSV inspector#33CatYang3 wants to merge 1 commit into
CatYang3 wants to merge 1 commit into
Conversation
Integrates the locomotion-mode pipeline end-to-end and adds supporting diagnostics + offline-replay tooling. Control logic: - __main__: read classification_left/right per row and call amplitude_modulation.set_mode each sample; respect main_switch with controller reset on the falling edge; add --fast batch mode that dumps every internal intermediate to <input>_output.csv and opens the result in the new CSV inspector. - WalkOnController: expose last_filtered_signal and last_gait_phase_rad; safety-gate the motor command to 0 when the filtered angle is negative. - AmplitudeModulation: cache per-stage values in a new AmplitudeIntermediates dataclass; retune Ascend/Descend stair-mode scale/power parameters. - MotorReferenceController / SogiFllFiltering / SensorPreprocessor: expose last_* attributes for offline logging of internal signals. - PreprocessorConfig: new VelocityInputAngle option (RAW / DRIFT_REMOVED / FILTERED); default keeps the previous behavior. - definitions: retune SOGI cadence bounds, initial frequency guess, LPF cutoffs, AMPLITUDE_GAIN (-6.5 -> -7), PID P gain (14 -> 8). Add main_switch column constant. Tooling: - CSVPlayer: tolerate semicolon delimiters, European decimals, alternate header names, missing timestamp/velocity/main_switch/ classification columns. Returns a new PlayerStep bundle. - plotter: new Simulink-Data-Inspector-style csv_inspector module with linked-axis stacked subplots and per-subplot pan/zoom/pick tools. Runnable via 'python -m hip_controller.plotter'. - __init__: fall back to '0.0.0+unknown' when neither installed package metadata nor pyproject.toml is reachable. - Tests updated for the PlayerStep return type; new csv_inspector tests added. Also includes a small ruff-format-driven consolidation of duplicate imports in tests/conftest.py. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Integrates the locomotion-mode pipeline end-to-end and adds supporting diagnostics + offline-replay tooling.
Control logic:
Tooling:
Also includes a small ruff-format-driven consolidation of duplicate imports in tests/conftest.py.
Summary
Describe the main changes in this PR:
Code Quality Checklist
Before requesting review, ensure:
make treeto update the README.mdAdditional Notes