Skip to content

fix: resolve logic bugs in ESKF and sensor fusion pipeline - #18

Closed
ARYA-mgc wants to merge 2 commits into
mainfrom
all-logic-fix
Closed

fix: resolve logic bugs in ESKF and sensor fusion pipeline#18
ARYA-mgc wants to merge 2 commits into
mainfrom
all-logic-fix

Conversation

@ARYA-mgc

@ARYA-mgc ARYA-mgc commented Jul 20, 2026

Copy link
Copy Markdown
Owner

@john-max-cyber Hey - opened this PR as a follow-up to #17 with some logic/bug fixes.
I'm pretty tied up with work this week and next, so if there's any small stuff that needs cleaning up on this, would appreciate a hand with it
Also, message me on Discord - I want to talk through this in more detail

Current Fixes

  • Corrected the optical flow attitude Jacobian sign
  • Switched terrain estimation to use the Kalman-filtered distance
  • Added exact attitude Jacobians for radar Doppler velocity and LiDAR tilt projection
  • Replaced the hardcoded magnetometer Jacobian with a dynamic attitude-coupled formulation

@john-max-cyber

Copy link
Copy Markdown
Collaborator

Hi @ARYA-mgc,
I'm busy with work right now, so I'll get back to you in 1 or 2 days. If you need anything, message me on Discord. I'll reply whenever I have some free time.

@ARYA-mgc

ARYA-mgc commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

Closing and reopening to trigger the new PR review bot

@ARYA-mgc ARYA-mgc closed this Jul 27, 2026
@ARYA-mgc ARYA-mgc reopened this Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 NavCore PR Review Bot

Automated review generated at 2026-07-27 05:52 UTC

Summary

Check Status Details
🔍 Lint (flake8) ⚠️ 185 issue(s)
🔠 Type Check (mypy) Clean
🧪 Tests (pytest) 0 passed, 0 failed, 0 skipped
📐 Jacobian Validation All analytical Jacobians match numerical finite-difference references.

⚠️ Some checks have warnings. Review the details below.


🔍 Lint Issues

❌ Errors (must fix)

File Line Code Message
scripts/analyze_flight.py 25 F401 'json' imported but unused
scripts/analyze_flight.py 26 F401 'math' imported but unused
scripts/analyze_flight.py 29 F401 'pathlib.Path' imported but unused
scripts/analyze_flight.py 37 F401 'utils.gt_eval.load_ground_truth_csv' imported but unused
scripts/analyze_flight.py 46 F401 'matplotlib.gridspec.GridSpec' imported but unused
scripts/analyze_flight.py 335 F401 'core.eskf.ESKF' imported but unused
scripts/generate_rtk_sim.py 23 F401 'json' imported but unused
scripts/rtk_validate.py 21 F401 'json' imported but unused
scripts/rtk_validate.py 25 F401 'pathlib.Path' imported but unused
scripts/rtk_validate.py 30 F401 'core.eskf.EKFHealth' imported but unused
scripts/validate_logs.py 18 F401 'math' imported but unused
scripts/validate_logs.py 21 F401 'pathlib.Path' imported but unused
scripts/validate_logs.py 22 F401 'typing.Tuple' imported but unused
scripts/validate_logs.py 22 F401 'typing.Optional' imported but unused
scripts/validate_logs.py 87 F841 local variable 'color' is assigned to but never used
src/core/m.py 307 F824 global _running is unused: name is never assigned in scope
src/interfaces/ros2.py 18 F401 'geometry_msgs.msg.Twist' imported but unused
src/interfaces/ros2.py 18 F401 'geometry_msgs.msg.PoseWithCovariance' imported but unused
src/interfaces/ros2.py 18 F401 'geometry_msgs.msg.TwistWithCovariance' imported but unused
src/interfaces/ros2.py 18 F401 'geometry_msgs.msg.Pose' imported but unused

⚠️ Warnings (101 total)

Click to expand
File Line Code Message
scripts/analyze_flight.py 37 E402 module level import not at top of file
scripts/analyze_flight.py 53 E302 expected 2 blank lines, found 1
scripts/analyze_flight.py 54 E221 multiple spaces before operator
scripts/analyze_flight.py 55 E221 multiple spaces before operator
scripts/analyze_flight.py 56 E221 multiple spaces before operator
scripts/analyze_flight.py 57 E221 multiple spaces before operator
scripts/analyze_flight.py 58 E221 multiple spaces before operator
scripts/analyze_flight.py 59 E221 multiple spaces before operator
scripts/generate_rtk_sim.py 42 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 43 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 44 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 63 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 64 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 77 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 78 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 79 E127 continuation line over-indented for visual indent
scripts/generate_rtk_sim.py 109 E127 continuation line over-indented for visual indent
scripts/rtk_validate.py 30 E402 module level import not at top of file
scripts/rtk_validate.py 31 E402 module level import not at top of file
src/core/eskf.py 2 E265 block comment should start with '# '
src/core/eskf_my_version.py 2 E265 block comment should start with '# '
src/core/eskf_my_version.py 125 E501 line too long (129 > 120 characters)
src/core/eskf_my_version.py 126 E501 line too long (130 > 120 characters)
src/core/sliding_window.py 463 E203 whitespace before ':'
src/core/sliding_window.py 463 E203 whitespace before ':'
src/core/sliding_window.py 464 E203 whitespace before ':'
src/core/sliding_window.py 464 E203 whitespace before ':'
src/core/sliding_window.py 465 E203 whitespace before ':'
src/core/sliding_window.py 465 E203 whitespace before ':'
src/core/sliding_window.py 466 E203 whitespace before ':'
... ... ... 71 more

💅 Style (64 total)

Click to expand
File Line Code Message
scripts/analyze_flight.py 51 W291 trailing whitespace
scripts/analyze_flight.py 137 W291 trailing whitespace
scripts/analyze_flight.py 209 W291 trailing whitespace
scripts/analyze_flight.py 239 W291 trailing whitespace
scripts/analyze_flight.py 255 W291 trailing whitespace
scripts/analyze_flight.py 262 W291 trailing whitespace
scripts/analyze_flight.py 282 W291 trailing whitespace
scripts/analyze_flight.py 285 W291 trailing whitespace
scripts/analyze_flight.py 288 W291 trailing whitespace
scripts/analyze_flight.py 308 W291 trailing whitespace
scripts/analyze_flight.py 454 W291 trailing whitespace
scripts/analyze_flight.py 476 W291 trailing whitespace
scripts/analyze_flight.py 496 W291 trailing whitespace
scripts/analyze_flight.py 512 W291 trailing whitespace
scripts/analyze_flight.py 534 W291 trailing whitespace
scripts/analyze_flight.py 574 W291 trailing whitespace
scripts/analyze_flight.py 601 W291 trailing whitespace
scripts/analyze_flight.py 704 W291 trailing whitespace
scripts/pr_review_comment.py 185 C901 'generate_comment' is too complex (18)
scripts/validate_logs.py 28 W291 trailing whitespace

📐 Jacobian Validation Details

Test Status
TestJacobianValidation::test_mag_jacobian ✅ PASSED
TestJacobianValidation::test_optical_flow_jacobian ✅ PASSED
TestJacobianValidation::test_radar_jacobian ✅ PASSED
TestJacobianValidation::test_lidar_jacobian ✅ PASSED

📐 All analytical Jacobians match their numerical finite-difference counterparts within tolerance. The sensor update math is verified.


🤖 Generated by NavCore PR Review Bot — runs on every PR targeting src/, tests/, or scripts/.

@ARYA-mgc ARYA-mgc closed this Jul 27, 2026
@ARYA-mgc ARYA-mgc reopened this Jul 27, 2026
@ARYA-mgc ARYA-mgc closed this Jul 27, 2026
@ARYA-mgc

Copy link
Copy Markdown
Owner Author

@john-max-cyber sorry for noises i will open new pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants