Skip to content

Tests for magnetic compensation (ellipsoid) - #487

Open
daviddgonzalez wants to merge 1 commit into
mainfrom
magnetic-ellipsoid-tests
Open

Tests for magnetic compensation (ellipsoid)#487
daviddgonzalez wants to merge 1 commit into
mainfrom
magnetic-ellipsoid-tests

Conversation

@daviddgonzalez

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for the magnetic compensation driver, including a new
ellipsoid module and accompanying unit tests. Rebased on top of the latest
main.

Changes

  • Add ellipsoid.py for ellipsoid-fit magnetic compensation
  • Add test_ellipsoid.py covering the ellipsoid fitting/compensation logic
  • Add test_param_validation.py for parameter validation
  • Add test_compensator.cpp for the C++ compensator
  • Expand test_basic_shift.py coverage
  • Simplify scripts/generate_config.py and related CMakeLists.txt / package.xml

Notes

This replaces the previous magnetic-compensation-tests branch/PR with an
updated branch that includes the latest changes from main.

Tested in ROS environment and found two bugs:
- ellipsoid.py doesn't verify if it's coplanar or not and the z component is
  determined through floating point rounding errors instead of being
  consistent, so the two BLAS don't output the same.
- fit_ellipsoid would accept fewer than 9 points and return a bad calibration.

Added fixes for both
@daviddgonzalez
daviddgonzalez force-pushed the magnetic-ellipsoid-tests branch from 453b7b4 to b417cda Compare June 9, 2026 20:10
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.

1 participant