Odrive and Touchdesigner?

Hey everyone!

Does someone here have some experience with touchdesigner099 and the odrive? As touchdesigner is based on python they should be fairly compatible?

I am planning on using a Kinect to detect motion and making a robotic arm move accordingly. Touchdesigner seems like a decent tool, especially since it has a very nice implementation of the Kinect!

Any thoughts?

One thing you may want to explore is using a Serial DAT node to directly communicate with the ODrive board using the Ascii protocol: https://docs.odriverobotics.com/ascii-protocol.html

I’ve used the Serial DAT to communicate with Arduinos and with other motor controller boards before in Touchdesigner.

So this is more of a low-level protocol which bypasses the need to use Python.

If you want to use Python take a look at the demo in the library:

Yes I work with touchdesigner and Arduino quite a lot as well and was hoping i could make it work similarly.

How would I format the sent out text DAT though? I’m planning on just sending out motor positions in a certain order and will probably just preconfigure them in a table DAT.
I’ve preconfigured it like this:

Would my sent out serial be just something like this?
op(‘serial1’).send(“p 1 50 *42 \n”)
I mean obviously not like just that because that doesnt seem to work. :rofl:

Except for setting the Odrive up as a serial port, are there other preconfigurations I’ve got to make to make this work?

I’m an idiot.
The correct code would be :
op(‘serial1’).send(“my Values”, terminator="\n")

To send it to a serial DAT. Works great for basic position control and the likes! Works great if you want to store a bunch of data and send it out when triggered.


Hey Terry have you had any success? I started to have success with controlling the motor, but now nothing. I think odrive may have gone into a error mode. Is there a list of the ascii commands, such as how to clear errors and/or how to run calibration and set closed loop control?

here is what I am using in the CHOPEXEC DAT attached to my slider:

def valueChange(channel, sampleIndex, val, prev):
	#sends the value of the slider to the serial dats send method
	command = 't 1 ' + str(int(val))
	op('serial2').send(command,  terminator='\n')
1 Like

Here are some more insights:

full calibration:
op('odrive_serial').send('w axis1.requested_state 8', terminator='\n')
closed loop:
op(‘odrive_serial’).send(‘w axis1.requested_state 3’, terminator=’\n’)
reboot odrive:
op(‘odrive_serial’).send(‘sb’, terminator=’\n’)

I could put together a little TD toe file if you are interested, I created little button based interface that lets me reboot the odrive, reconnect over serial and rezero & calibrate.

1 Like

Hey Tom!
Just finished my bachelor thesis a couple of days ago- didn’t find the time to answer earlier!

To be honest I cheated a little- I set up the Odrive entirely through Anaconda and left it running for easy debugging, because I’ve found the TouchDesigner/Ascii code caused errors more regularly (maybe also because Ive used four different serial outs as well as a Kinect as input, oops!) and I like still keeping Anacondas running for realtime debugging.

You’ve gotten way further than I have yet :wink: Would be super cool to see how you managed!

1 Like