LiamBindle / PyVESC

PyVESC is an easy to use and robust Python implementation of the VESC - Open Source ESC communication protocol
https://pyvesc.readthedocs.io/en/latest/
Creative Commons Attribution 4.0 International
75 stars 54 forks source link

Does this work at all with VESC FW6 / FW5.03? #29

Open raquo opened 1 year ago

raquo commented 1 year ago

The code in this library predates these versions by many years, yet I see fairly recent commits and a lot of forks. One fork appears to target FW 3.x. Is there a newer version of this library that supports recent firmware versions, that I missed perhaps?

I want to get VESC 6 UART working with python, but I don't see any documentation / description on what the UART protocol actually is. Do such docs exist? For comparison, I currently use APD ESCs, and their UART protocol is described here.

MelvinWarnet commented 4 months ago

Hi raquo, I'm currently wondering the same thing. Have you found an answer somewhere? Personally, I'm trying to send the COMM_DETECT_APPLY_ALL_FOC message. All my parameters seem correct, but the motor doesn't behave the same way as it does with VESC Tool, and I can't decode the responses from the VESC. So I'm starting to wonder if this library is still capable of communicating with the new VESC firmware.

raquo commented 4 months ago

@MelvinWarnet I've looked at several VESC interfacing libraries, and ended up writing my own VESC interfacing code for CircuitPython. However, I only use the COMM_GET_VALUES command, and parse its response. I don't have the code for any other commands, nor experience in using other commands.

I do think this PyVESC library can talk to VESC 6, at least the message encoding / decoding code I looked at seems to do the same things as other libraries do, and what my code does. I haven't looked much at the part of this library that reads and writes messages over the wire because CircuitPython only supports a subset of Python, and I don't think it includes the threading functionality that this library uses, so my code for that looks quite different.

I hope to eventually open source my code for the benefit of anyone else using CircuitPython, but right now the code is tied to my project, and I don't have time to detangle it yet. Maybe in a few months, if anyone cares.

Wishing you good luck trying to figure out that command... I don't know what it does, but if you have doubts that the library does not work properly, try sending other simple commands COMM_GET_VALUES and read their responses – if that doesn't work either, then the problem is probably in the codec or communication layer somewhere (or maybe even physical wiring), and is not related to your specific command.