odrive-messages
This is an unofficial Rust implemenation of the ODrive CAN protocol messages. This is a low-level crate, which only handles decoding and encoding the CAN Frames and does not handle sending them or waiting for responses. A higher-level crate using this one for ergonomic management of ODrives is envisioned.
Limitations
This crate is not yet finished. While all the ODrive CAN protocol messages are supported, the interface this crate provides is not yet final and may change. In particular, the error handling is currently not particularly good.
Roadmap:
- Decode and encode any ODrive CAN message
- Convert ODrive error codes into human-readable errors
- Implement proper error handling
- Support
no-std - Provide better facilities for working with the
RxSdoandTxSdomessages
Usage
The crate provides top-level methods for generating CAN frames, which can be sent using any can_embedded compatible crate; for example socketcan on Linux. To parse CAN messages, one can use the top-level parse_frame function or messagess::CanMessageWithId::from_frame directly.
Example using socketcan:
let socket = open?;
socket.set_read_timeout?;
socket.write_frame;
loop
License
This crate is published under the MIT License.