pip3 install moteus
I’m excited to announce new python bindings for communicating with moteus controllers! A simple example from the README:
import asyncio
import math
import moteus
async def main():
c = moteus.Controller()
print(await c.set_position(position=math.nan, query=True))
await asyncio.sleep(1.0)
asyncio.run(main())
This code will try to locate an fdcanusb on your host and use it to communicate with controller with ID 1. All of those details can be customized through code depending upon how you construct things. The library is pure python, although it doesn’t work on Windows currently because it relies on an asyncio aware pyserial wrapper that doesn’t work there.