Repository navigation
Add RobStride RS00 and RS06 Rust codec and Python bindings - #3
Draft
ammarjmahmood wants to merge 3 commits into
Draft
ammarjmahmood wants to merge 3 commits into
ammarjmahmood wants to merge 3 commits into
Conversation
Member
|
Hi @ammarjmahmood thx for contribution. have you tested the implementation from your end? I don't have a robstride motor so unable to test. lmk when you think it's ready by making this ready for review! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DimOS has a Rust CAN control library for Damiao motors, but the existing Robostride motor type has no codec. This adds a separate no_std RS00 and RS06 codec plus Python bindings, allowing B601 RS motors to use the existing native transport and group APIs.
The codec implements MIT commands, explicit lifecycle frames, mode readback, typed parameter frame helpers, status and fault decoding. Motor identity binding provides model scaling and logical receive routing when motors share a host address. The core retains no vendor runtime dependency, and existing Damiao behavior is preserved. Unsupported command modes and invalid numeric inputs fail explicitly.
Protocol ranges follow the November 2025 model manuals. Differences from the official Python sample, temperature limitations and supported modes are documented in docs/robstride.md. Connection sends no frames. The contribution includes a B601 RS configuration, packet tests, shared host routing regression, Python regressions and reproducible mock timing measurement.
Validation: locked Rust workspace tests, Rustfmt and strict Clippy pass. The no default features host check and thumbv7em-none-eabihf embedded build pass. A release x86 abi3 wheel builds and all 28 Python tests pass from a fresh installation. Native seven motor encode and decode measured p50 170 ns and p99 260 ns. The release Python mock loop measured p50 1.03 microseconds and p99 3.59 microseconds. These exclude physical CAN latency and do not establish real time safety. Native Jetson aarch64 builds and workspace tests now pass. All 28 Python tests pass there against the release extension. Its seven motor mock loop measured p50 2.59 microseconds and p99 5.44 microseconds, with peak resident memory 34,964 KiB. Physical Pi and motor qualification remain pending. Keep this PR in draft for review and hardware validation.