You are here

Question about COMM_GET_IMU_DATA packet

4 posts / 0 new
Last post
rrzaripov
Offline
Last seen: 4 years 9 months ago
Joined: 2020-03-04 00:08
Posts: 1
Question about COMM_GET_IMU_DATA packet

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.

NATUITION
NATUITION's picture
Offline
Last seen: 2 weeks 14 hours ago
VESC Free
Joined: 2019-09-27 20:56
Posts: 8

Hey,

Up for this topic, any ideas guys?

Cyril ROUDOT
www.natuition.com

Bela
Offline
Last seen: 3 years 2 months ago
Joined: 2020-04-20 11:57
Posts: 1

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 

 

 

Addy
Offline
Last seen: 5 months 3 weeks ago
Joined: 2017-09-06 01:53
Posts: 13

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.