ee_guidance — EE target selection, POSE path, and the GuidanceMode state machine
Purpose
Picks one raw EE camera pose per step through the
GuidanceModemachine
(INITIAL → HOLD/TARGETING/FALLBACK), finalizes it through smoothing + reach limiting, and (via the
controller) marks FOV coverage. The top of the guidance tower: it owns the camera schedule and the
EE feedforward twist (analytic or finite-difference).
Role in the system
extendsbase_guidance (BaseGuidance→ com_guidanceCOMGuidance) — the deep guidance chain.- Called by breve_controller each step via
add_ee_goal(live) /sample_guidance_goal(rollout);
share_motion_cachewires the controller’s motion cache in. - Feeds the EE twist to breve_controller (
derate_twist_by_gamma,analytic_desired_nu_e_feedforward). - Supported by analytic_feedforward (closed-form twist), target_finder (mesh, ANCHOR scorer, FOV
marking), and guidance_classes (CameraPose/SurfaceTarget/Selection,GuidanceMode/OrbitPathMode). - Guidance-without-dynamics path: guidance_rollout drives it through
fake_kinematics.
Inputs / Outputs
- In:
State(q, v → forward kinematics) orDesired(rollout), the previousDesired, the step index,
config (targeting / trajectory / orbit-path), ands_min_Gfor the derate ramp. - Out: a finalized
Desiredwith EE pose(p_e, R_e, z_e); the desired EE twistnu_e; and the
per-step guidance/inspection/diagnostics log Package.
Key methods
set_ee_target— branch owner; selects one raw pose per step across all modes —GNC/guidance/ee_guidance.py:699orbit_path_pose— deterministic POSE pose: aim atx_surf(s_aim)from the standoff radius —:684_aim_arclength— the aim clocks_aim(progress-synced or open-loop; floor/lead knobs) —:670consistent_finalize_pose— filter → reach-limit → commit → write ontoDesired(one finalizer) —:792filter_camera_pose— first-order smooth + rate-limit of position and pointing axis —:812guidanceModeINITIAL/guidanceModeHOLD/guidanceModeTARGETING/guidanceModeFALLBACK— the four mode poses —:346/:469/:498/:451update_due/accept_target— reselect cadence + score-margin acceptance (ANCHOR only) —:405/:562analytic_desired_nu_e_feedforward— closed-form EE twist + reduced derivative (POSE only) —:267derate_twist_by_gamma— scale the commanded EE twist byγ(s_min_G)—:219
Footguns
POSE is the adopted default — the scorer is INERT
In POSE mode the camera pose is scheduled by
orbit_path_pose(the analytic path), so the
EETargetFinderscorer never runs. In ANCHOR mode the anchor is a CoM-orbit vantage point, NOT
x_surf— placing candidate cameras atx_surfwould put them inside the target surface.
Both modes requireorbit_path; CHAIN_12 removed the pathless reactive flow. (GNC/INSIGHTS.md[guidance])
Analytic feedforward is POSE-only
analytic_ff_applicable()isTrueifforbit_path_mode is POSE. The closed form assumes the look
axisz_ed = ufromx_surf(s_aim)andv_des = const,s̈ = 0. ANCHOR falls back to finite-difference
(desired_nu_e_feedforward_consistent) because the scorer picks a different aim point. (GNC/INSIGHTS.md[math])
Latched INITIAL offsets persist until reset
default_selection.p_ceanddefault_R_be0are latched on the first INITIAL call from the real EE
pose; onlyreset_runtime_stateclears them. The aim-clock state_s_aim_previnits toNone, so the
floor branch is a no-op on the first_aim_arclengthcall. (GNC/INSIGHTS.md[footgun])
derate_twist_by_gammauses measured-state γThe EE-twist derate scales the commanded twist by
γ(s_min_G)(the same conditioning ramp), applied
to the FF output so the analytic FF stays reference-only pure. Speed-derate is the rejected A/B variant —
the endorsed mechanism is impedance (gain) derate in breve_controller. (GNC/INSIGHTS.md[derate])
Pseudocode (one guidance step)
add_ee_goal(st, des_base, step_idx):
default_pose, mode = guidanceModeINITIAL(st) # latched p_ce / R_be0 hold
if aim_during_initial and 1 <= step < startup: # CHAIN_4: aim along path during INITIAL
raw = orbit_path_pose(st, mode=INITIAL)
elif not enabled or still in INITIAL window:
raw = default_pose
elif POSE mode:
raw = orbit_path_pose(st) # x_surf(s_aim) at standoff; scorer INERT
else: # ANCHOR: scorer with path vantage
if not update_due: raw = exit_hold(st)
else: choose_goal → clamp → rescore → accept_target → exit_{targeting|fallback|hold}
return consistent_finalize_pose(st, des, raw):
filter_camera_pose (low-pass + per-step rate/slew clamp)
enforce_reach_limit (clamp |p_ce| <= r_reach)
commit + write (p_e, R_e, z_e) onto Desired
Equations & references
Key equations mirrored from current_sota — the math source of truth; see there for derivations.
Standoff pose construction (POSE mode) — §5.4, eq (5.7):
World-frame desired twist — §5.5, eq (5.14):
Circumcentroidal () conversion — §5.6, eq (5.17):
References:
- POSE-mode orbit-path guidance + the aim clock: current_sota (project guidance section).
- Analytic desired twist (§5.8–5.18) is computed in analytic_feedforward and invoked here.
Related
base_guidance · com_guidance · analytic_feedforward · target_finder · guidance_classes · guidance_rollout · breve_controller · terminology · ee_feedforward · target_finding_coverage · guidance_modes