Skip to content

Publish complete robot commands and owned state snapshots - #97

Open
kylevedder wants to merge 1 commit into
i2rt-robotics:mainfrom
kylevedder:codex/fix-robot-command-races
Open

kylevedder wants to merge 1 commit into
i2rt-robotics:mainfrom
kylevedder:codex/fix-robot-command-races

Conversation

@kylevedder

@kylevedder kylevedder commented Sep 20, 2026 •

Copy link
Copy Markdown

Concurrent readers can observe partially built commands or block behind motor I/O. Shared arrays let callers mutate active commands and internal state, and simulated position/velocity updates are published separately.

Publish complete command and gain updates under the existing locks, copy command and observation arrays, and release the state lock before motor I/O. Hold the simulation lock across combined position/velocity updates.

Publish complete commands and gain pairs under their lock, return owned state snapshots, and release the state lock before motor I/O. Apply simulated position and velocity commands atomically.
@kylevedder
kylevedder force-pushed the codex/fix-robot-command-races branch from 0b5e59c to 5b54d8e Compare September 20, 2026 10:49

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