Hi, I was write small Python binding for communicate with device using serial port.
As start point I use yours project. Currently I successfully handle COMM_FW_VERSION:
VESC Firmware Version 3.65, Hardware: 60, UUID: 25 00 2e 00 17 47 37 33 38 33 32 38
Now I parse COMM_GET_IMU_DATA and I have next questions:
1. Can you please explain, what mean byte before CRC value?
02 - type
43 - len (67)
41 ff - mask
ff be 74 71 - roll
03 bd 70 7e - pitch
21 40 03 26 - yaw
8c 3d 76 00 - accX
00 3e 77 00 - accY
00 3f 7e 60 - accZ
00 bf ab e0 - gyroX
00 00 00 00 - gyroY
00 3f 9c 40 - gyroZ
00 bf 96 00 - magX
00 42 0c a0 - magY
00 41 a8 c0 - magZ
00 3f 04 bc - q0
46 3d 17 38 - q1
c6 bd ef 4b - q2
d7 bf 58 a4 - q3
0c <--- what this?
92 7c - crc
03 - end byte
2. I see that YAW values changes from 180 to -180, and then start again from 180. Device stay without movement, why YAW changing? Possibly I must previously to set up device by sending some commands? I've stuck with this, but I see that in vesc-tool YAW not drifed.
...
roll: -3.719266 pitch: -2.816149 yaw: 0.016336
roll: -3.756796 pitch: -2.715678 yaw: -0.259613
...
roll: -3.762160 pitch: -2.892427 yaw: -179.967944
roll: -3.813403 pitch: -2.757731 yaw: 179.755348
...
Many thanks in advance for any help and advice.
Hey,
Up for this topic, any ideas guys?
Cyril ROUDOT
www.natuition.com
Answer from vesc begins with 02 +length byte+command in this case 0x41+ mask 0xFFFF and +data + two byte 0xcrc+ 03...
In yours example 02 43 41 ff ff be 74 ...
type len comm mask
I don't have the answer to your question, but did you hear of the PyVESC project? https://github.com/LiamBindle/PyVESC
It doesn't have the COMM_GET_IMU_DATA packet implemented yet, but the framework is there. If someone implements this packet it could be merged into PyVESC.