-
Notifications
You must be signed in to change notification settings - Fork 15
feat(odrive): Add odrive_ascii
component to a simple implementation of the ASCII ODrive protocol for motor control
#518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… of the ASCII ODrive protocol for motor control
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new odrive_ascii
component that implements a simple, dependency-free ASCII protocol for communicating with ODrive motor controllers over UART. The component provides property registration, command parsing, and response formatting without handling actual UART communication or motor control logic.
Key changes:
- New
OdriveAscii
class supporting ODrive-compatible ASCII commands (read/write properties, position/velocity/torque commands) - Example application demonstrating scripted and interactive console usage
- Comprehensive documentation including API reference and usage examples
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
components/odrive_ascii/include/odrive_ascii.hpp | Core class definition with property registration and command callbacks |
components/odrive_ascii/src/odrive_ascii.cpp | Implementation of ASCII protocol parsing and command handling |
components/odrive_ascii/example/ | Interactive example with ESP32 console integration |
doc/en/odrive_ascii.rst | Component documentation with API reference |
.github/workflows/build.yml | CI integration for automated building |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
✅Static analysis result - no issues found! ✅ |
Description
odrive_ascii
component which implements a dependency-free ASCII protocol for communicating with ODrive motor controllers over UART. It merey performs the property lookup, command parsing, and response formatting. It does not handle the actual UART communication or the motor control logic, which are both left to the user to wire up to their own system as needed.Motivation and Context
ODrive is a popular open-source motor controller for robotics and automation applications. While it does have a binary protocol over CAN and a custom protocol over USB Vendor endpoints, it also provides a simple ASCII protocol over UART. This protocol is easy to implement and can be used with a wide range of microcontrollers and systems.
How has this been tested?
Build and run
odrive_ascii/example
on a QtPy ESP32s3 and validate that the example prints the expected test output, and that it responds correctly to input commands.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.