Fix/fast axis#818
Draft
wakonig wants to merge 4 commits into
Draft
Conversation
3216ce4 to
570d892
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes the “fast axis is the inner axis” convention across scans and updates corridor trajectory optimization so it no longer ignores that convention, adding regression coverage to lock in the intended ordering/direction behavior.
Changes:
- Update corridor optimization to use
fast_axis,first_corridor_direction, andsnakedto control ordering and traversal direction. - Adapt scan components (and Fermat/hex scans) to pass the new corridor-optimization parameters consistently with the fast-axis convention.
- Add/adjust tests to verify fast-axis ordering and corridor snaking/direction behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bec_server/bec_server/scan_server/path_optimization.py | Refactors corridor optimizer API/logic to be fast-axis driven and adds Direction enum support. |
| bec_server/bec_server/scan_server/scans/scan_components.py | Updates optimize_trajectory() corridor dispatch to the new corridor optimizer API. |
| bec_server/bec_server/scan_server/scans/position_generators.py | Adjusts hex grid generation semantics to treat axis1 as the fast axis. |
| bec_server/bec_server/scan_server/scans/legacy_scans.py | Aligns legacy corridor optimization call sites and hex grid docs/axis semantics; introduces first_direction on legacy Fermat scan. |
| bec_server/bec_server/scan_server/scans/fermat_scan.py | Applies trajectory optimization in v4 Fermat scan using the new first-corridor direction convention. |
| bec_server/tests/tests_scan_server/test_path_optimization.py | Adds regression test ensuring first_corridor_direction and snaked are respected. |
| bec_server/tests/tests_scan_server/test_legacy_scans.py | Updates hex scan snaking test parameters to match axis semantics. |
| bec_server/tests/tests_scan_server/scans_v4/test_scan_components.py | Updates corridor optimization expectations and adds coverage for new parameter passing. |
| bec_server/tests/tests_scan_server/scans_v4/test_hexagonal_scan.py | Adds coverage asserting second axis is treated as fast axis. |
| bec_server/tests/tests_scan_server/scans_v4/test_fermat_scan.py | Adds coverage for Fermat corridor first-direction selection based on fast-axis range. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b9effde to
54b492d
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes inconsistencies in BEC where the fast axis was not always the inner axis. Moreover, the trajectory optimization simply ignored the convention.