Skip to content

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Sep 15, 2025

Description

  • Add 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):

CleanShot 2025-09-15 at 09 37 01

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

… of the ASCII ODrive protocol for motor control
@Copilot Copilot AI review requested due to automatic review settings September 15, 2025 14:36
Copy link
Contributor

@Copilot Copilot AI left a 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.

@finger563 finger563 self-assigned this Sep 15, 2025
@finger563 finger563 added enhancement New feature or request motor control bldc Related to Brushless DC Motors odrive labels Sep 15, 2025
Copy link

github-actions bot commented Sep 15, 2025

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit ea72ef6 into main Sep 15, 2025
93 of 95 checks passed
@finger563 finger563 deleted the feat/odrive-ascii branch September 15, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bldc Related to Brushless DC Motors enhancement New feature or request motor control odrive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant