Feat/smargon #314
No Reviewers
Labels
Clear labels
issue::not confirmed
issue::not reproducible
issue::reproducible
priority::critical
priority::needed
priority::nice to have
scope::backend
scope::frontend
stage::in development
stage::on hold
stage::pre_release
stage::ready for review
stage::selected for development
stage::weekly backlog
type::bug
type::discussion
type::doc
type::feature
type::improvement
type::test
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Used if an issue has not yet been confirmed by a developer
Used if an issue is not reproducible
Used if a developer was able to reproduce the issue
Should be done as soon as possible
An important update to the code base
Not really needed but a good improvement
An issue regarding the backend services
An issue regarding the user-facing services
This issue is currently being worked on
Something is blocking the development
For issues that have been merged into a pre-release branch and are waiting for their release.
For issues that have been resolved and are ready for review
This issue has been selected for development but has not been scheduled yet
This issue has been selected for development for the next development cycle
It's a bug!
A discussion is wanted/needed
Improvements to the documentation
A new feature
Neither a feature nor a bug but an improvement to the code base
Missing tests or improvements to the test suite
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
acerbo_a (acerbo_a)
bec-gitea
debenjak_l (debenjak_l)
diaz (diaz)
divall_e (divall_e)
guizar_m (guizar_m)
haghta_s (haghta_s)
holler (holler)
lombosi_c (lombosi_c)
malu_s (malu_s)
menzel (menzel)
perl_d (perl_d)
usov_i (usov_i)
wakonig_k (wakonig_k)
wang_x1 (wang_x1)
wyzula_j (wyzula_j)
zamofing_t (zamofing_t)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bec/csaxs_bec#314
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Per-axis BEC motors over the virtual SmarGon Coordinate System axes, sharing a singleton SmargopoloController, with an ophyd-free transport layer — RestTransport against the real :3000 API, plus an in-memory FakeTransport for offline use and tests. smargopolo runs the kinematics and drives the underlying q1..q6 MCS2 stages; this device never commands those directly.
Adds only its own package and its own two config files.
Tested against the hardware since.
Merged into current main: 101 failed / 580 passed / 12 skipped (measured with all three branches stacked), against a baseline of 101 failed / 532 passed.
Initial BEC ophyd integration for the SmarGon goniometer via the smargopolo RESTful API. Controls the virtual SCS axes (the server runs the kinematics; the underlying q1..q6 stages are never commanded directly). Structure mirrors the Canon CR-N300 device: an ophyd-free transport (real RestTransport over urllib + in-memory FakeTransport) with threaded poll-to-tolerance positioners and a PSIDeviceBase parent. Scope / decisions: - v1 movable axes: SHX SHY SHZ CHI PHI; OMEGA optional via has_omega (YAML). - Referencing is a deliberate operator action (reference()); moves refuse unless Mode.READY. - Soft limits are user-set; smargopolo owns the coupled hardware limits. Both fault paths handled: up-front PUT rejection fails the move immediately, and a mid-move fault (mode -> 99 ERROR) aborts the in-flight move with the rosout detail (SmarGon._raise_if_error). - Move completion = readback within (user-set) tolerance, done on first in-tolerance sample (robust to active position-hold dither). Status: DRAFT. 27 unit tests pass against FakeTransport, but NOTHING has been tested against a real smargopolo server or hardware. Do not commission as-is. Open questions (to confirm with the smargopolo maintainer, W. Glettig): - Stop semantics: no explicit stop endpoint; we abort by retargeting an axis to its current readback ("Follow Target" halt). Confirm this is the intended way. - Mid-move fault signalling: we rely on /mode -> 99 (ERROR) with the reason in /readbackMCS rosout.msg. Confirm an out-of-range / coupled-limit violation reliably drives this, so the abort path is dependable. - Per-poll cost: the mid-move check adds a /readbackMCS GET alongside the /readbackSCS position read (~20 req/s per moving axis at 0.1s). Revisit once we know whether /readbackSCS also carries mode, or once the per-motor `state` strings can give a truer moving/settled flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>