Commit 6602bdf
fix(followers): enterprise audit v6.0.2 — fresh-eyes safety & correctness pass
CRITICAL safety fixes:
- fw_attitude_rate: fix bank angle PID sign inversion (was computing -P*error instead of +P*error)
- fw_attitude_rate: fix TargetLossAction local enum shadowing safety_types (RTL/ORBIT never fired)
- fw_attitude_rate: fix rtl_triggered not reset on state reset (RTL permanently stuck after first trigger)
- mc_attitude_rate: fix TargetLossAction local enum shadowing (RTL never fired)
- mc_attitude_rate: remove dead _parse_target_loss_action method (unreachable code)
- mc_velocity_ground: fix pid_z repulsive force bug (setpoint=min_descent_height caused drone to climb)
High-priority fixes:
- base_follower: move numpy import to module level (was re-imported on every 20Hz call)
- mc_attitude_rate: TARGET_ALTITUDE_OFFSET default 0.0→15.0 (matches config)
- mc_velocity_position: YAW_CONTROL_THRESHOLD default 0.05→0.02 (matches config)
- mc_velocity_position: getattr altitude default 0.0→None (activates existing None guard)
- mc_velocity_distance: ENABLE_ALTITUDE_CONTROL default True→False (safe ground testing)
- mc_velocity_ground: MAX_RATE_OF_DESCENT default 2.0→1.0 (matches config)
- gm_velocity_chase: remove inline import math in hot path (already at module level)
- mc_velocity_distance: move inline 'from math import degrees' to module level
Code quality:
- gm_velocity_chase: strip emoji from logger calls (breaks log parsers/grep/enterprise logs)
Config/schema cleanup:
- config_schema.yaml: remove orphaned safety keys from per-follower sections
- config_schema.yaml: fix range maxima, type mismatches, missing FW_ATTITUDE_RATE keys
- config_default.yaml: align key names with code expectations
- follower_commands.yaml: add missing deprecated aliases
- scripts/generate_schema.py: remove dead section registrations
Docs updates (12 files):
- Fix Safety.GlobalLimits/FollowerOverrides config structure throughout
- Fix AltitudeLimits/RateLimits from @DataClass to NamedTuple
- Fix TrackerOutput angular field (remove stale gimbal_pan/gimbal_tilt)
- Fix factory-pattern.md: deprecated aliases raise ValueError (not warnings)
- Update follower count, remove pid_pursuit references, fix stale aliases
- Fix safety-manager.md: FollowerLimits types, get_altitude_limits() signature
Tests: 1547 passed, 49 skipped, 0 failed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2b0c747 commit 6602bdf
File tree
23 files changed
+254
-410
lines changed- configs
- docs
- drone-interface/05-configuration
- followers
- 01-architecture
- 02-reference
- 04-configuration
- 06-safety
- 07-integration
- scripts
- src/classes/followers
23 files changed
+254
-410
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
| 1297 | + | |
1297 | 1298 | | |
1298 | 1299 | | |
1299 | 1300 | | |
| |||
1928 | 1929 | | |
1929 | 1930 | | |
1930 | 1931 | | |
1931 | | - | |
| 1932 | + | |
1932 | 1933 | | |
1933 | 1934 | | |
1934 | 1935 | | |
| |||
2164 | 2165 | | |
2165 | 2166 | | |
2166 | 2167 | | |
2167 | | - | |
| 2168 | + | |
2168 | 2169 | | |
2169 | 2170 | | |
2170 | 2171 | | |
| |||
0 commit comments