Skip to content

Expose command dispatch timestamp - #27

Merged
kou merged 1 commit into
enactic:mainfrom
stevenaya:feat/executed-command-metadata
Sep 9, 2026
Merged

kou merged 1 commit into
enactic:mainfrom
stevenaya:feat/executed-command-metadata

Conversation

@stevenaya

@stevenaya stevenaya commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose the wall-clock time captured immediately before dispatching the latest accepted position target;
  • publish the cached command and timestamp only after arm and gripper dispatch calls succeed;
  • keep an owned copy of the accepted target so caller-side mutations cannot change driver state;
  • invalidate dispatch metadata when a new start session begins.

Why

Downstream nodes need a wall-clock dispatch marker to correlate the command accepted by the driver with external observations. This is a software dispatch timestamp, not motor acknowledgement or physical motion time. The existing monotonic timestamp remains dedicated to velocity limiting.

The boolean send result now belongs to draft PR #23, where safety rejection introduces real False paths.

Validation

  • pytest (41 passed)
  • ruff check .
  • ruff format --check .

@stevenaya
stevenaya force-pushed the feat/executed-command-metadata branch from d27b026 to ed6e6bd Compare September 4, 2026 14:25
kou pushed a commit that referenced this pull request Sep 8, 2026
## Summary
- align configured arm limits and numeric precision with the current
OpenArm model
- use the full J1/J2 range for the pedestal configuration while
retaining the cell-specific range
- update the gripper limit precision and position-limit tests

Follow-up PRs #27 and #23 have been rebased on top of this change.

## Testing
- `.venv/bin/pytest -q` (40 passed)
- `.venv/bin/ruff check .`

Co-authored-by: stevenaya <stevenaya@users.noreply.github.com>
@kou

kou commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

#28 has been merged. Could you rebase on main?

@stevenaya
stevenaya force-pushed the feat/executed-command-metadata branch from ed6e6bd to f6e245d Compare September 8, 2026 07:33
@stevenaya

Copy link
Copy Markdown
Contributor Author

Already rebased on main ^^.

@stevenaya
stevenaya force-pushed the feat/executed-command-metadata branch from f6e245d to 18c2544 Compare September 8, 2026 10:12
@stevenaya stevenaya changed the title Expose executed command timestamp Expose command dispatch timestamp Sep 8, 2026
@stevenaya

Copy link
Copy Markdown
Contributor Author

Implementation note for the less obvious choices:

  • last_command_time_s intentionally uses a monotonic clock for velocity limiting, while last_command_dispatch_timestamp_ns uses wall time for correlation with external observations.
  • The wall timestamp is sampled immediately before dispatch, but the public command/timestamp state is committed only after both arm and gripper dispatch calls succeed.
  • start() invalidates dispatch metadata from the previous enable session; PR Handle joint delta safety stops without exiting #23 additionally synchronizes the command baseline to measured state.
  • np.array(...) keeps an owned snapshot so later caller-side mutations cannot alter last_command.

The boolean return was moved to #23, where safety rejection provides meaningful False paths.

@kou
kou merged commit 05f0f02 into enactic:main Sep 9, 2026
5 checks passed
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