Feat/aaronrhim/hmi deploy layouts - #187
Merged
Merged
Conversation
Brings the Science_RD spectrophotometer workflow into the HMI so standard curves can be built and unknown samples measured on the rover instead of a laptop shell. The Python pipeline (curve_gen.py, capture_and_predict.py, fake_data_gen.py) is vendored unmodified from Science_RD and stays the single source of numerical truth; the module drives it over QProcess so a capture never blocks the UI. spectro_paths keeps scripts and data in the repo rather than ~/.config. Also fixes the container Python env, where apt's matplotlib and scipy are built against the numpy 1.x ABI and fail to import against the image's numpy 2.x, leaving savgol_filter and curve_fit unusable. SpectrumView ports PySpectrometer2's graph to Qt in the HMI theme: 10 nm graticule with 50 nm labels, the trace filled with each wavelength's visible colour, labelled peaks, hover readout and an assay-wavelength marker. Real captures are in pixel order and the calibration polynomial need not be monotonic — Science_RD's Rezasurin data folds twice, so 570 nm is claimed by three different pixels — so traces are split at their turning points and each monotonic run drawn separately, with a warning naming the fold count. The Standard Curve tab builds a model from known standards and predicts unknowns, showing the fit and the plots curve_gen writes. Distinct from the six-vial absorbance readout in Science Analysis, which comes from the science embedded node over /science/sensor_data. Hidden by default; capture additionally needs a caldata.txt and an attached camera. Verified against Science_RD's real Rezasurin standards: R2 0.980833, slope 1.636312, matching their recorded yeast_model.json.
LayoutStore persists HMI layouts as JSON in src/rover_hmi_core/config/layouts (resolved via ROVERFLAKE_ROOT with a build-time fallback), replacing QSettings so layouts live in the repo. tiling_container hoists its tunables and dedupes overlay/nav/persistence helpers. entrypoint and rover_env source the ROS setup before building so a clean workspace has an environment.
ScienceModule gains drillmotorstatus, drillstepperdir and vacuumstatus, and ScienceModule drives them with toggle and Lower/Hold/Raise controls that reflect the published state. ScienceModulePipeline subscribes to both the command and sensor topics so the pipeline view follows what was actually commanded. Adds runtime font zoom: Ctrl+= and Ctrl+- adjust, Ctrl+0 resets, cached in /tmp so a scale survives an HMI restart without becoming permanent. A FontScaleFilter reapplies the scale when a module rewrites a widget's stylesheet at runtime. Baseline sizes are raised and XL/Title steps added for touch-target controls.
Nothing in the repo publishes /science/sensor_data — the science embedded node lives outside it — so every science module reads "--" forever and the UI cannot be exercised without hardware. ScienceSimModule publishes that topic at 10 Hz from the HMI itself, with controls for drill lower/hold/raise, OSF flow, sample loaded and spectro ready, so the pipeline and analysis views can be developed and demoed against plausible data. Off by default; enable with the SIM toggle.
cv_bridge's compiled extension is built against the numpy 1.x ABI and crashes under the container's numpy 2; raw rgb8/bgr8 conversion is a few lines of frombuffer/tobytes, so drop the dependency entirely.
aaronrhim
added a commit
that referenced
this pull request
Aug 5, 2026
…ename router_A -> hmi_router (PR #187 feedback)
aaronrhim
force-pushed
the
feat/aaronrhim/hmi_deploy_layouts
branch
from
August 5, 2026 06:25
835989a to
ac1e97a
Compare
…xporter - homing reverted to main's convention: zero at switch, independent axes, park at idle_position; HOMED_WAITING/group retreat removed - A5/A6 limit switches enabled (aux2 pin 0), wrist-aware set_axis_position stamps both differential motors; seed/overtravel/retreat respect homing_direction sign; M4 switch moved to pin 0 - homing UI: A5/A6 selectable, dialog matches switch-zero behavior - dev_arm_moveit_config_v4: renamed self-references from stale v2 name (collided with the real v2 package)
…arm_driver_hardening branch - homing state machine = main's (switch zero, A5 wrist special-case, A6 relative) - raw BlockingCycle, no guardTransport/watchdog/bus-redetect (accepted main faults) - calibration removed end to end: driver callbacks/stubs, HMI Calibrate buttons, /arm/calibration_request pub; HMI is RAM-only — Apply & Write Flash removed, write_flash dropped from MoteusConfigUpdate (flash/calibration are bench jobs) - kept: telemetry contract (last-known + connected, can_device, motors_replying, masked limit switches), staggered conf-get reads (read-only), command clamps, A4 enabled, checkFaults dead code deleted
This reverts commit 00915e7.
BenUBC
reviewed
Aug 7, 2026
| export COLCON_DEFAULTS_FILE="${ROVERFLAKE_ROOT}/colcon.defaults.yaml" | ||
|
|
||
| # Rover operational DDS domain. Pre-exported values win (e.g. bench isolation). | ||
| export ROS_DOMAIN_ID="${ROS_DOMAIN_ID:-101}" |
BenUBC
reviewed
Aug 7, 2026
Roozki
approved these changes
Aug 7, 2026
Contributor
There was a problem hiding this comment.
Tabling for now. need to test on cbs
Contributor
There was a problem hiding this comment.
This is okay but should be specificied in the PR description. "Changed active joystick to yadda yadda"
Contributor
There was a problem hiding this comment.
in the future we should wrap all log msgs in a "#ifdef DEBUG_MSGS" to clean up terminal noise
Contributor
There was a problem hiding this comment.
i try to avoid services just to reduce complexity but ehh isok
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.
TODO: