ODrive Can Bus Help

Hi, all I have been using the ODrive and communicating via serial and it works great. However, the project I am planning requires the use of many Odrives to work so CAN is looking like the best option for communication. Currently, I have an Odrive hooked up via CAN to the longan serial can bus device which in turn is hooked up to an Arduino. Theoretically, this should allow me to communicate over CAN bus using the Arduino’s serial port. I have tested Arduino to Arduino communication and it works great so no problem with the can bus boards. However, when I add the ODrive to the loop I begin receiving some sort of heartbeat data that I would like an explanation for. When printing out the data byte by byte which I know isn’t optimal but I am still trying to figure out what data I’m getting, I receive the following bytes.

0003300001000

It’s these 13 bytes that consistently come in. I am just trying to figure out what information this is. I disabled the can bus heartbeat on the ODrive side to eliminate some of the information. Could anyone help? I just need a basic understanding of the protocol and full packet structure unfortunately the CAN Bus protocol described on the ODrive website was sufficient in helping me decipher what I am getting.

When I add the heartbeat back I get two distinct packets.
0003300001000
0009700001000
Still doesn’t exactly help with my understanding. My can ID is 3 as well.

It seems like both of them were heart beats for axis 1 and axis 0 respectively. I still would like to know why that is the specific data that gets sent and more about the packet structure that I am seeing thanks.

I found another USB CAN device that I have found here https://www.seeedstudio.com/USB-CAN-Analyzer-p-2888.html. I found this useful python can bus tool for the Odrive https://gitlab.com/towen/ODrive/-/tree/TOwen/devel/tools/CAN. using this and changing the interface of the lower level canbus library used to the seeed studio version I am able to successfully read voltage and set things like the current motor state. However when I try to set either the velocity or position no luck nothing moves.

The protocol is described here https://docs.odriverobotics.com/can-protocol

Try printing hex values over serial with Arduino instead of decimal, it’ll probably make more sense.

So I figured that part out and I am not using Tom Owns python library for controlling ODrive via CAN. It works for setting the active state of the ODrive axis just fine but when I try to set the position or velocity of the ODrive it doesn’t move the motor. I’m not sure if I am missing something in my configuration but I did everything described on the can protocol section of the ODrive website.

I assume you’re able to run the controller via USB?

Yes everything works perfectly over USB