Skip to content

Avoid blocking and lost updates in shared CAN commands - #96

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

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

Conversation

@kylevedder

@kylevedder kylevedder commented Sep 20, 2026 •

Copy link
Copy Markdown

CAN reads hold the command lock while waiting for feedback, blocking command updates. Concurrent base and rail updates can also overwrite each other in the shared command list.

Snapshot commands before CAN I/O and update selected motor velocities atomically. Read passive-encoder feedback outside its snapshot lock.

Snapshot commands before synchronous CAN I/O. Update selected motor velocities atomically so concurrent base and rail commands do not overwrite each other.
@kylevedder
kylevedder force-pushed the codex/fix-can-command-races branch from fce167b to ee547c3 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