Skip to content

Include the level offset in ellipse polynomial coefficients - #300

Open
kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix/ellipse-polynomial-constant
Open

kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix/ellipse-polynomial-constant

Conversation

@kaushikgunasekaren

Copy link
Copy Markdown

Ellipse.polynomial documents coefficients of an equation equal to zero, but its constant term omits the ellipse's unit level. For a unit circle it returns [1, 1, 0, 0, 0, 0], describing x**2 + y**2 = 0 instead of x**2 + y**2 - 1 = 0. Every perimeter point evaluates to 1 rather than 0.

Subtract 1 from the constant coefficient when expanding (x-centre).T @ E @ (x-centre) = 1.

Validation on current master 25b19b3, Python 3.10:

  • 12 regression configurations span two radii pairs, translated/origin centres and three rotations. Independently constructed perimeter points evaluate to 0, the centre to -1 and a point at twice the radius to 3. All 12 configurations fail before the fix and pass after it.
  • Full local suite: 567 passed, 3 skipped, 111 subtests passed; 29 existing warnings. Pristine baseline: 566 passed, 3 skipped, 99 subtests passed with the same warnings.
  • Black 23.10.0, fatal-error flake8 checks on changed files, and git diff --check pass.

This fixes coefficient export only, independently of #290's coefficient-import normalization. AI assistance was used for investigation, implementation and tests. Validated locally without robot hardware.

This branch has not been deployed

No deployments
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