Skip to content

Default radii-only ellipses to zero orientation - #293

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

kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix/ellipse-default-orientation

Conversation

@kaushikgunasekaren

Copy link
Copy Markdown

Ellipse advertises theta as optional with a default of None, but Ellipse(radii=(1,2)) passes None into np.cos/np.sin and raises TypeError before constructing the ellipse. Treat omitted or explicit None orientation as zero rotation in the radii constructor. Leave explicit angles and the E-matrix path unchanged, and document the default.

Add 24 cases covering omitted/None/zero/nonzero orientation, integer tuples and floating tuples/arrays for radii, origin/translated centres, the analytic ellipse matrix, containment and area. Original code: 12 omitted/None cases fail, 12 explicit-angle controls pass. Fixed full suite: 590 passed, 3 skipped, 99 subtests passed; 29 existing warnings (untouched baseline: 566 passed with the same skips/subtests/warnings). Python 3.10, NumPy, headless Matplotlib, no hardware. Black 23.10.0, fatal-flake8 selection and git diff --check pass.

This changes only radii-based construction with theta=None. It does not alter polynomial scaling or the open #290 work.

AI assistance was used for investigation, implementation and tests. The validation above was run locally; no robot hardware testing is claimed.

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