ODrive Documentation

High performance motor control

View the Project on GitHub madcowswe/ODrive

Help improve these docs: submit edits using the link in the top right.

If you need help, please search or ask the ODrive Community.

ASCII Protocol

How to send commands

Command format

The ASCII protocol is human-readable and line-oriented, with each line having the following format:

command *42 ; comment [new line character]

Command Reference

Motor trajectory command

t motor destination

Example: t 0 -20000

For general moving around of the axis, this is the recommended command.

Motor Position command

For basic use where you send one setpoint at at a time, use the q command. If you have a realtime controller that is streaming setpoints and tracking a trajectory, use the p command.

q motor position velocity_lim current_lim

Example: q 0 -20000 10000 10

p motor position velocity_ff current_ff

Example: p 0 -20000 0 0

Note that if you don’t know what feed-forward is or what it’s used for, simply omit it.

Motor Velocity command

v motor velocity current_ff

Example: v 0 1000 0

Note that if you don’t know what feed-forward is or what it’s used for, simply omit it.

Motor Current command

c motor current

This command updates the watchdog timer for the motor.

Request feedback

f motor

response:
pos vel

Update motor watchdog

u motor

This command updates the watchdog timer for the motor, without changing any setpoints.

Parameter reading/writing

Not all parameters can be accessed via the ASCII protocol but at least all parameters with float and integer type are supported.

System commands: