Skip to content

Sequencer scripting#404

Draft
astronomerdave wants to merge 37 commits into
issue-363-slicecam-acquire-v2from
sequencer-scripting
Draft

Sequencer scripting#404
astronomerdave wants to merge 37 commits into
issue-363-slicecam-acquire-v2from
sequencer-scripting

Conversation

@astronomerdave
Copy link
Copy Markdown
Contributor

Implements a sequencer command language (SCL) to provide a safer controlled interface for users to issue commands to the instrument, either through individual commands or through custom scripting.

@astronomerdave astronomerdave requested review from prkrtg and scizen9 April 6, 2026 16:29
prkrtg and others added 9 commits April 7, 2026 11:24
Implements slicecam fine acquisition

* Introduced slicecam_math.cpp/h implementing centroid detection, WCS pix2world conversion, and angular offset calculations.
* Added a do_fineacquire loop to the Slicecam interface to automate target centering based on configurable aimpoints and background regions.
* Added FINE_ACQUIRE_AIMPOINT and FINE_ACQUIRE_BACKGROUND parameters to the daemon configuration.
* Replaces receiving a JSON message with the existing PUB-SUB mechanism
* Updated target_offset logic to better distinguish between TCS-direct offsets and ACAM-guided goal offsets.
* Renamed dothread_acquisition to do_acam_acquire and added atomic tracking for fine-acquisition locks and guiding states.
changes std::string to string_view where string not needed
moves wait_for_XXXX wrappers to a separate file
moves sequence building tools to a separate file
* adds subscriber topic handlers to sequencerd
* introduces a command handler header-only lib (WIP, not implemented)
astronomerdave and others added 13 commits April 8, 2026 11:55
updates Sequencer::Sequence::run() to use this for retry on error,
and uses this to tidy the startup() sequence
* implements a generic ThreadPool class so that the sequencer
  isn't continuously creating new threads (something I should
  have done a long time ago) -- not tested yet
 * adds subsystem command coverage in sequencerd_command and operation_builders
 * write Ops factories and sequence build/parse flow for daemon-backed operations
 * preserve positional args for passthrough operations
 * adds functionality to validate_sequence with safety checks for parallel/serial
 * adds engineering mode to relax checks
* splits ACQUIRE wait state into MOVETO, ACAM_ACQUIRE, SLICECAM_FINEACQUIRE
* fixes minor logging typos in focus_server and tcs_server
UDP broadcast with a ZMQ publisher and uses PUB-SUB to send/get
status automatically instead of having to ask for it.

These changes are not pertinent to this feature branch but are being
included so that this branch keeps up with other progress.
branch in support of fine acquisition and general pub-sub improvement,
and other fixes along the way.

These changes are not pertinent to the work being done for the
sequencer-scripting branch but must be included so that this
branch keeps up with other progress while awaiting PR approval.
wraps md5.c in extern "C" { }
rewrites sendcmd.c -> sendcmd.cpp
* fills out sequencer command specs and transitions but doesn't
  use them yet -- this is the last stage before changing how it works
* comment-out some debug logging
* replaces daemon_passthrough() placeholder with translate_command +
  CommandClient<State>::send(), adds per-command arg count and
  state machine validation at execution time
* rewrites parse_command with strict key=val grammar
* fixes ltrim bug
* fixes move_to_target bug for CAL targets
* fixes abort_process for clean state transitions
* adds missing request_snapshot to get status on startup
in a separate serial group following that. Should speed-up
startup while maintaining serialization of camera inits
* fix: camerad was missing topic handler for SNAPSHOT
* fix: Sequence::camera_set could not always set wait_state
* fix: sequencer PAUSE command checked seq_state_manager for wait state
* fixes binning bug
* fixes make_directory bug
(had already done this in fineacquire-update-sequencer-pub branch,
 now repeated here)
* "threads" to "operations"
* "xxxx_set" functions to "xxxx_setup"
fix: was missing an error broadcast
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.

2 participants