odriverobotics / ODrive

High performance motor control
https://odriverobotics.com
MIT License
2.89k stars 1.5k forks source link

How to manage several Odrives with UART? #722

Closed active-game closed 1 year ago

active-game commented 1 year ago

How i can run several Odrives with UART? How to communicate with several Odrives in UART? how to change address of each device without using serial number? For example Now command : p 0 or 1 -2 0 0 I can only select the motor number, but how do I access another odrive?

samuelsadok commented 1 year ago

Multiple ODrives on a single UART line are not supported, you need to connect each ODrive to a separate UART port.

active-game commented 1 year ago

Multiple ODrives on a single UART line are not supported, you need to connect each ODrive to a separate UART port.

It's a pity! didn't the developers really think about adding the device address?! as it is done in others Servodrivers or VFD.

samuelsadok commented 1 year ago

UART is usually only used for one-to-one connections. If you want to use multiple devices on one bus, I recommend to use CAN.

active-game commented 1 year ago

UART is usually only used for one-to-one connections. If you want to use multiple devices on one bus, I recommend to use CAN.

Thank you! How i can use multiple odrive in can?

samuelsadok commented 1 year ago

There is a node_id you can set for CAN. See the docs for details: https://docs.odriverobotics.com/v/0.5.5/can-protocol.html