ethz-asl / ethzasl_xsens_driver

Driver for xsens IMUs
BSD 2-Clause "Simplified" License
102 stars 111 forks source link

5 th generation #61

Open 0xd1ma opened 6 years ago

0xd1ma commented 6 years ago

Hello everyone.

For autonomous vehicle project, I am planning to by MTi-30 AHRS.

On http://wiki.ros.org/xsens_driver says: "This package provides a driver for the third and fourth generation..."

Do this ROS driver supports 5 th generation of Xsens sensors?

Thank you.

fcolas commented 6 years ago

I'm not aware that Xsens updated their sensors to a fifth generation and, to my knowledge, MTi-30 AHRS is a name that fits the MTi-10 series introduced as part of the fourth generation. Can you provide a link for that? In any case, as long as it complies to the same protocol with the same message type on a serial or USB interface, it should be supported.

0xd1ma commented 6 years ago

first page and Introduction MTi_usermanual.pdf

fcolas commented 6 years ago

Sorry for the delay. I was finally able to find updated documentation and it seems that they only added a few things but most of the protocol is similar. I expect most things will work and but the new feature are not yet configurable. I'm going to work on that.

fcolas commented 6 years ago

@0xd1ma Did you buy the device? If so, could you test the support_gen_5 branch?

0xd1ma commented 6 years ago

@fcolas the sensor will arrive in mid-May. I will test

0xd1ma commented 6 years ago

Finally, the sensor arrived and I performed some tests. Brunch works. but from time to time the node stops working and issues the following:

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /xsens_driver/baudrate: 115200
 * /xsens_driver/device: /dev/mti30
 * /xsens_driver/frame_id: imu
 * /xsens_driver/frame_local: ENU
 * /xsens_driver/no_rotation_duration: 0
 * /xsens_driver/timeout: 0.002

NODES
  /
    xsens_driver (xsens_driver/mtnode.py)

ROS_MASTER_URI=http://localhost:11311

process[xsens_driver-1]: started with pid [4780]
[INFO] [1529336639.413169]: Found parameter: ~device, value: /dev/mti30
[INFO] [1529336639.416146]: Found parameter: ~baudrate, value: 115200
[INFO] [1529336639.419158]: Found parameter: ~timeout, value: 0.002
[INFO] [1529336639.419691]: MT node interface: /dev/mti30 at 115200 bd.
[INFO] [1529336639.478598]: Found parameter: ~no_rotation_duration, value: 0
[INFO] [1529336639.479631]: Found parameter: ~frame_id, value: imu
[INFO] [1529336639.480527]: Found parameter: ~frame_local, value: ENU
Traceback (most recent call last):
  File "/home/scar/catkin_ws/src/ethzasl_xsens_driver/nodes/mtnode.py", line 780, in <module>
    main()
  File "/home/scar/catkin_ws/src/ethzasl_xsens_driver/nodes/mtnode.py", line 776, in main
    driver.spin()
  File "/home/scar/catkin_ws/src/ethzasl_xsens_driver/nodes/mtnode.py", line 133, in spin
    self.spin_once()
  File "/home/scar/catkin_ws/src/ethzasl_xsens_driver/nodes/mtnode.py", line 692, in spin_once
    data = self.mt.read_measurement()
  File "/home/scar/git/ethzasl_xsens_driver/nodes/mtdevice.py", line 683, in read_measurement
    return self.parse_MTData2(data)
  File "/home/scar/git/ethzasl_xsens_driver/nodes/mtdevice.py", line 1014, in parse_MTData2
    raise MTException("couldn't parse MTData2 message.")
mtdef.MTException: couldn't parse MTData2 message.
[xsens_driver-1] process has died [pid 4780, exit code 1, cmd /home/scar/catkin_ws/src/ethzasl_xsens_driver/nodes/mtnode.py __name:=xsens_driver __log:=/home/scar/.ros/log/51d8dcec-730e-11e8-a560-d85d4c888192/xsens_driver-1.log].
log file: /home/scar/.ros/log/51d8dcec-730e-11e8-a560-d85d4c888192/xsens_driver-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

There are also no reports of speed changes, similarly https://github.com/ethz-asl/ethzasl_xsens_driver/issues/73

header: 
  seq: 2418
  stamp: 
    secs: 1529338273
    nsecs: 578365087
  frame_id: "imu"
twist: 
  linear: 
    x: 0.0
    y: 0.0
    z: 0.0
  angular: 
    x: 0.0288859009743
    y: -0.0141263036057
    z: -0.00568330287933

mtdevice.txt xsens.txt

fcolas commented 6 years ago

Many thanks for the information. The issue you have seems to come from parsing the message from the IMU. Is it easy to reproduce? Does it happen without the node (there's no reason it wouldn't):

rosrun xsens_driver mtdevice.py

If that's the case, you could try with the verbose flag and paste the (end of the) output of:

rosrun xsens_driver mtdevice.py -v

This would allow us to see the content of the message that poses problem.

fcolas commented 6 years ago

@0xd1ma No news?

Adixy commented 6 years ago

Hello,

I encountered the same issue. I'm using the MTi G 700 This is the output of

rosrun xsens_driver mtdevice.py -v

MT: Write message id 0x30 (GoToConfig) with 0 data bytes: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 161 data bytes: [10 20 02 9E 2D 10 60 04 00 AB 34 1B 20 30 0C BE C2 84 8F 3D AA 7D 0C C1 A7 D3 21 40 20 0C BC A1 22 4A BD 89 85 C3 41 1C FC 3C 40 10 0C B9 D4 C8 49 BA AF 7D 59 3E 48 F0 F0 40 30 0C BC 03 46 05 3B 21 93 43 3C 14 5D 00 80 20 0C BA 8C A0 65 BB 55 74 B4 3C 47 33 34 80 30 10 3F 80 00 01 B7 34 00 7E B8 08 9C 9C 38 FE F9 DC C0 20 0C BF 63 B9 0B BD F1 DA A9 3F E0 00 8A 08 10 04 42 28 00 00 E0 20 04 01 80 00 C7 50 40 08 42 37 2C 0D 41 80 45 7F D0 10 0C 3D A5 41 81 3D 65 CC A1 3C F4 F1 0A] ack (0x31) expected, got 0x36 instead waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x31 (GoToConfigAck) with 0 data bytes: [] MT: Write message id 0x0C (ReqConfiguration) with 0 data bytes: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x0D (Configuration) with 118 data bytes: [07 70 04 11 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 07 70 04 11 00 00 00 04 00 00 00 01 00 03 01 03 07 37 02 02] MT: Write message id 0x10 (GoToMeasurement) with 0 data bytes: [] MT: Got message id 0x11 (GoToMeasurementAck) with 0 data bytes: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 2E 10 60 04 00 AB 35 54 30 10 04 00 01 88 E7 E0 20 04 01 80 00 C7] {'Status': {'StatusWord': 25166023}, 'Timestamp': {'PacketCounter': 40494, 'SampleTimeFine': 11220308}, 'Pressure': {'Pressure': 100583}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 131 data bytes: [10 20 02 9E 2F 10 60 04 00 AB 35 86 40 20 0C BB CF 3B 48 BC E0 A5 A5 40 6B 74 52 40 10 0C B9 02 A3 F5 BA 0F C1 C2 3D 96 B0 D8 80 20 0C B8 6D 72 E9 3A A1 FC DA 3B E5 F0 11 80 30 10 3F 80 00 00 B5 17 F7 9F 37 4F 58 22 38 93 29 00 C0 20 0C BF 65 24 8F BD EC 27 15 3F DF A7 4A 08 10 04 42 28 00 00 E0 20 04 01 80 00 87 50 40 08 42 38 74 32 41 80 45 7F D0 10 0C 3C F2 F7 7E 3C 9E 8B 48 3C 19 AD CD] {'Acceleration': {'Delta v.z': 0.07357949018478394, 'Delta v.y': -0.0005483889253810048, 'Delta v.x': -0.00012458844867069274, 'frame': 'ENU', 'accY': -0.02742273546755314, 'accX': -0.006324205547571182, 'accZ': 3.6789746284484863}, 'Status': {'StatusWord': 25165959}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40495, 'SampleTimeFine': 11220358}, 'Magnetic': {'magZ': 1.7472927570343018, 'frame': 'ENU', 'magX': -0.8950890898704529, 'magY': -0.11530891805887222}, 'Angular Velocity': {'Delta q1': -5.661221962327545e-07, 'Delta q0': 1.0, 'Delta q3': 7.017143070697784e-05, 'Delta q2': 1.235868148796726e-05, 'frame': 'ENU', 'gyrZ': 0.007017143536359072, 'gyrX': -5.661222166963853e-05, 'gyrY': 0.0012358680833131075}, 'Velocity': {'frame': 'ENU', 'velZ': 0.009379816241562366, 'velY': 0.01935352385044098, 'velX': 0.029659029096364975}, 'Position': {'lat': 46.11347198486328, 'frame': 'ENU', 'lon': 16.033933639526367}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 30 10 60 04 00 AB 35 EA 30 10 04 00 01 88 E7 E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40496, 'SampleTimeFine': 11220458}, 'Pressure': {'Pressure': 100583}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 31 10 60 04 00 AB 36 4E 20 30 0C BE DA DB D0 3D BE 7C B3 C2 C8 1C FE 40 20 0C BB 9C DD F0 BD 76 C5 2B 41 1D 23 12 40 10 0C B8 E5 A7 62 BA 9D BA 84 3E 49 22 A6 40 30 0C 3C 41 52 92 BC 34 C5 DA 3C 73 D0 00 80 20 0C B9 D3 55 D9 BB 6A 68 5F 3C 43 A7 92 80 30 10 3F 80 00 01 B6 87 41 2F B8 16 05 5A 38 FA 70 16 C0 20 0C BF 63 B3 0D BD F2 13 83 3F DF AC 31 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19642123579978943, 'Delta v.y': -0.0012033735401928425, 'Delta v.x': -0.00010950748401228338, 'frame': 'ENU', 'accY': -0.060246627777814865, 'accX': -0.0047871991991996765, 'accZ': 9.821062088012695, 'freeAccZ': 0.014881134033203125, 'freeAccY': -0.011033499613404274, 'freeAccX': 0.011799471452832222}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40497, 'SampleTimeFine': 11220558}, 'Magnetic': {'magZ': 1.747442364692688, 'frame': 'ENU', 'magX': -0.8894508481025696, 'magY': -0.11820127815008163}, 'Angular Velocity': {'Delta q1': -4.03090189138311e-06, 'Delta q0': 1.0000001192092896, 'Delta q3': 0.00011941806587856263, 'Delta q2': -3.576777089620009e-05, 'frame': 'ENU', 'gyrZ': 0.011941807344555855, 'gyrX': -0.00040309017640538514, 'gyrY': -0.0035767776425927877}, 'Orientation Data': {'Yaw': -100.05662536621094, 'Pitch': 0.0930112823843956, 'frame': 'ENU', 'Roll': -0.4274582862854004}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 32 10 60 04 00 AB 36 B2 30 10 04 00 01 88 E7 E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40498, 'SampleTimeFine': 11220658}, 'Pressure': {'Pressure': 100583}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 33 10 60 04 00 AB 37 16 20 30 0C BE DC 5F 47 3D B9 5B F2 C2 C8 17 2C 40 20 0C 3B 96 47 08 BD 87 78 32 41 1D 31 54 40 10 0C 38 AE 90 36 BA AC 0E E5 3E 49 34 EA 40 30 0C 3B 0A AC E5 BC A7 52 AA 3C 8F 08 C0 80 20 0C BB 2A 8E FC BB 11 D8 7D 3C 22 B1 12 80 30 10 3F 80 00 01 B7 DA 50 9C B7 BA AE B3 38 D0 3E CF C0 20 0C BF 65 D9 37 BD EC 46 18 3F DF 4E 59 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19649091362953186, 'Delta v.y': -0.001312699750997126, 'Delta v.x': 8.323827933054417e-05, 'frame': 'ENU', 'accY': -0.06614722311496735, 'accX': 0.004586104303598404, 'accZ': 9.824542999267578, 'freeAccZ': 0.017460227012634277, 'freeAccY': -0.020425159484148026, 'freeAccX': 0.002116018207743764}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40499, 'SampleTimeFine': 11220758}, 'Magnetic': {'magZ': 1.74457848072052, 'frame': 'ENU', 'magX': -0.8978456854820251, 'magY': -0.1153680682182312}, 'Angular Velocity': {'Delta q1': -2.6025161787401885e-05, 'Delta q0': 1.0000001192092896, 'Delta q3': 9.929911902872846e-05, 'Delta q2': -2.2254278519540094e-05, 'frame': 'ENU', 'gyrZ': 0.00992991216480732, 'gyrX': -0.0026025166735053062, 'gyrY': -0.002225428121164441}, 'Orientation Data': {'Yaw': -100.04525756835938, 'Pitch': 0.0905074030160904, 'frame': 'ENU', 'Roll': -0.4304144084453583}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 34 10 60 04 00 AB 37 7A 30 10 04 00 01 88 EF E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40500, 'SampleTimeFine': 11220858}, 'Pressure': {'Pressure': 100591}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 35 10 60 04 00 AB 37 DE 20 30 0C BE DC 50 6F 3D B5 C5 D4 C2 C8 10 BE 40 20 0C BA 64 AD 2B BD 7B D4 D6 41 1C F8 D6 40 10 0C B7 C5 5E 96 BA A1 36 86 3E 48 EC 97 40 30 0C 3C 47 5F 0B BC 5C C9 B2 3B AB AB 00 80 20 0C 38 A4 58 4E BA D4 1C 2F 3C 33 24 ED 80 30 10 3F 80 00 01 35 52 5C 8C B7 87 C0 1C 38 E5 4D FA C0 20 0C BF 65 16 FE BD E0 EE 74 3F DF 5B 85 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19621501863002777, 'Delta v.y': -0.0012299574445933104, 'Delta v.x': -2.3528275050921366e-05, 'frame': 'ENU', 'accY': -0.061482273042201996, 'accX': -0.0008723313803784549, 'accZ': 9.810750961303711, 'freeAccZ': 0.005238890647888184, 'freeAccY': -0.013475822284817696, 'freeAccX': 0.01216865610331297}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40501, 'SampleTimeFine': 11220958}, 'Magnetic': {'magZ': 1.7449804544448853, 'frame': 'ENU', 'magX': -0.894882082939148, 'magY': -0.10982981324195862}, 'Angular Velocity': {'Delta q1': 7.836576969566522e-07, 'Delta q0': 1.0000001192092896, 'Delta q3': 0.00010934095189440995, 'Delta q2': -1.6182711988221854e-05, 'frame': 'ENU', 'gyrZ': 0.01093409676104784, 'gyrX': 7.836577424313873e-05, 'gyrY': -0.0016182715771719813}, 'Orientation Data': {'Yaw': -100.03269958496094, 'Pitch': 0.08875623345375061, 'frame': 'ENU', 'Roll': -0.43030115962028503}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 36 10 60 04 00 AB 38 42 30 10 04 00 01 88 F2 E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40502, 'SampleTimeFine': 11221058}, 'Pressure': {'Pressure': 100594}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 37 10 60 04 00 AB 38 A6 20 30 0C BE DD 7E 39 3D AB 32 0F C2 C8 0A A4 40 20 0C 3A C0 54 30 BD 87 20 AF 41 1D 30 50 40 10 0C 37 47 BD FC BA AB E9 77 3E 49 33 9D 40 30 0C 3B F1 0B 3A BC 91 73 BD 3C 88 66 C0 80 20 0C BB 05 B5 68 BB 93 B6 75 3C 2A 01 BE 80 30 10 3F 80 00 00 B7 AB 25 A3 B8 3D 12 80 38 D9 9B D3 C0 20 0C BF 64 63 EC BD EC 79 C8 3F DF 57 8A 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.1964859515428543, 'Delta v.y': -0.0013115842593833804, 'Delta v.x': 1.1905558494618163e-05, 'frame': 'ENU', 'accY': -0.06598030775785446, 'accX': 0.001467352733016014, 'accZ': 9.824295043945312, 'freeAccZ': 0.01665055751800537, 'freeAccY': -0.017755383625626564, 'freeAccX': 0.0073560746386647224}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40503, 'SampleTimeFine': 11221158}, 'Magnetic': {'magZ': 1.744858980178833, 'frame': 'ENU', 'magX': -0.8921496868133545, 'magY': -0.1154666543006897}, 'Angular Velocity': {'Delta q1': -2.0402314476086758e-05, 'Delta q0': 1.0, 'Delta q3': 0.00010376390855526552, 'Delta q2': -4.50783409178257e-05, 'frame': 'ENU', 'gyrZ': 0.010376391932368279, 'gyrX': -0.0020402316004037857, 'gyrY': -0.004507834557443857}, 'Orientation Data': {'Yaw': -100.02078247070312, 'Pitch': 0.08359157294034958, 'frame': 'ENU', 'Roll': -0.4326036274433136}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 38 10 60 04 00 AB 39 0A 30 10 04 00 01 88 EF E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40504, 'SampleTimeFine': 11221258}, 'Pressure': {'Pressure': 100591}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 39 10 60 04 00 AB 39 6E 20 30 0C BE DD A1 47 3D AA B6 E1 C2 C8 03 92 40 20 0C BC 77 4A 0C BD 72 D8 E9 41 1C FD 60 40 10 0C B9 9F 32 2C BA 9B 4F 2E 3E 48 F2 67 40 30 0C 3C 69 94 47 BB 86 4C 3E 3B EE C5 00 80 20 0C B9 79 C7 45 BA 09 A7 C7 3C 45 4A 4C 80 30 10 3F 80 00 01 B6 1F DB B1 B6 B0 32 EA 38 FC 88 10 C0 20 0C BF 63 9A 1F BD D5 B0 A8 3F DF 6D 49 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19623719155788422, 'Delta v.y': -0.001184915890917182, 'Delta v.x': -0.0003036422422155738, 'frame': 'ENU', 'accY': -0.05928889289498329, 'accX': -0.015093337744474411, 'accZ': 9.811859130859375, 'freeAccZ': 0.007286667823791504, 'freeAccY': -0.0040984442457556725, 'freeAccX': 0.014256543479859829}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40505, 'SampleTimeFine': 11221358}, 'Magnetic': {'magZ': 1.7455226182937622, 'frame': 'ENU', 'magX': -0.889070451259613, 'magY': -0.10434085130691528}, 'Angular Velocity': {'Delta q1': -2.38207235270238e-06, 'Delta q0': 1.0000001192092896, 'Delta q3': 0.00012041640002280474, 'Delta q2': -5.251135917205829e-06, 'frame': 'ENU', 'gyrZ': 0.012041639536619186, 'gyrX': -0.00023820724163670093, 'gyrY': -0.0005251136026345193}, 'Orientation Data': {'Yaw': -100.00697326660156, 'Pitch': 0.08335662633180618, 'frame': 'ENU', 'Roll': -0.4328710734844208}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 3A 10 60 04 00 AB 39 D2 30 10 04 00 01 88 F5 E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40506, 'SampleTimeFine': 11221458}, 'Pressure': {'Pressure': 100597}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 3B 10 60 04 00 AB 3A 36 20 30 0C BE DE AC DF 3D A3 68 67 C2 C7 FE 45 40 20 0C BC 57 A8 92 BD 60 06 9B 41 1D 10 F8 40 10 0C B9 90 83 CA BA 8E 72 9E 3E 49 0B 7C 40 30 0C 3C 9A 56 CB BB 63 CE 2A 3C 39 11 00 80 20 0C BA EE 27 9D BB 51 FC 70 3C 13 8F 03 80 30 10 3F 80 00 01 B7 98 6B 46 B8 06 64 1F 38 BC E0 04 C0 20 0C BF 63 8C 8E BD CA 78 07 3F DF 21 83 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.1963328719139099, 'Delta v.y': -0.001086789881810546, 'Delta v.x': -0.0002756401081569493, 'frame': 'ENU', 'accY': -0.0546937994658947, 'accX': -0.013162748888134956, 'accZ': 9.816642761230469, 'freeAccZ': 0.011295557022094727, 'freeAccY': -0.003476033452898264, 'freeAccX': 0.018840214237570763}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40507, 'SampleTimeFine': 11221558}, 'Magnetic': {'magZ': 1.7432101964950562, 'frame': 'ENU', 'magX': -0.8888634443283081, 'magY': -0.09886174649000168}, 'Angular Velocity': {'Delta q1': -1.8169765098718926e-05, 'Delta q0': 1.0000001192092896, 'Delta q3': 9.006264735944569e-05, 'Delta q2': -3.204133463441394e-05, 'frame': 'ENU', 'gyrZ': 0.009006264619529247, 'gyrX': -0.001816976466216147, 'gyrY': -0.0032041333615779877}, 'Orientation Data': {'Yaw': -99.99662017822266, 'Pitch': 0.07978897541761398, 'frame': 'ENU', 'Roll': -0.43491265177726746}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 3C 10 60 04 00 AB 3A 9A 30 10 04 00 01 88 EF E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40508, 'SampleTimeFine': 11221658}, 'Pressure': {'Pressure': 100591}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 3D 10 60 04 00 AB 3A FE 20 30 0C BE E0 3F CD 3D A0 F7 1C C2 C7 F7 A5 40 20 0C BB 8D 3F 09 BD 96 08 01 41 1D 1F C8 40 10 0C B8 BD 2C 45 BA BE A3 0D 3E 49 1E 76 40 30 0C BA 47 6C 56 BC 0D 67 EB 3C 68 31 80 80 20 0C BB 32 EE 7F BA 90 5D AE 3C 3A 22 BC 80 30 10 3F 80 00 01 B7 E5 08 50 B7 38 C9 D4 38 EE 40 F4 C0 20 0C BF 62 EE A1 BD EC AD 78 3F DF 60 BA 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19640526175498962, 'Delta v.y': -0.001454444252885878, 'Delta v.x': -9.020468132803217e-05, 'frame': 'ENU', 'accY': -0.0732574537396431, 'accX': -0.004310492891818285, 'accZ': 9.820259094238281, 'freeAccZ': 0.014171957969665527, 'freeAccY': -0.008630733005702496, 'freeAccX': -0.0007607390871271491}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40509, 'SampleTimeFine': 11221758}, 'Magnetic': {'magZ': 1.7451393604278564, 'frame': 'ENU', 'magX': -0.8864536881446838, 'magY': -0.1155652403831482}, 'Angular Velocity': {'Delta q1': -2.7302798116579652e-05, 'Delta q0': 1.0000001192092896, 'Delta q3': 0.00011360822827555239, 'Delta q2': -1.1014246410923079e-05, 'frame': 'ENU', 'gyrZ': 0.01136082038283348, 'gyrX': -0.002730279928073287, 'gyrY': -0.0011014246847480536}, 'Orientation Data': {'Yaw': -99.98368072509766, 'Pitch': 0.0785963237285614, 'frame': 'ENU', 'Roll': -0.4379867613315582}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 3E 10 60 04 00 AB 3B 62 30 10 04 00 01 88 E7 E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40510, 'SampleTimeFine': 11221858}, 'Pressure': {'Pressure': 100583}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 135 data bytes: [10 20 02 9E 3F 10 60 04 00 AB 3B C6 20 30 0C BE DF 60 E9 3D 9E 44 27 C2 C7 F0 BA 40 20 0C 3B B5 EF 55 BD 7E 06 C5 41 1D 25 E4 40 10 0C 38 DF AD 2F BA A3 4F 6A 3E 49 26 41 40 30 0C 3C 28 E0 B6 BC 9F 7E C7 3C 9E 03 00 80 20 0C 3A BB 82 0C BA 9C 2B 67 3C 41 B9 00 80 30 10 3F 80 00 00 37 70 02 9F B7 47 E5 A2 38 F7 F7 0A C0 20 0C BF 66 94 79 BD DA 90 51 3F DF FF 50 08 10 04 42 28 00 00 E0 20 04 00 00 00 85] {'Acceleration': {'Delta v.z': 0.19643498957157135, 'Delta v.y': -0.0012459580320864916, 'Delta v.x': 0.0001066572658601217, 'frame': 'ENU', 'accY': -0.062018174678087234, 'accX': 0.005552212242037058, 'accZ': 9.82175064086914, 'freeAccZ': 0.01928853988647461, 'freeAccY': -0.01946963183581829, 'freeAccX': 0.01030748151242733}, 'Status': {'StatusWord': 133}, 'Temperature': {'Temp': 42.0}, 'Timestamp': {'PacketCounter': 40511, 'SampleTimeFine': 11221958}, 'Magnetic': {'magZ': 1.749979019165039, 'frame': 'ENU', 'magX': -0.9007030129432678, 'magY': -0.10672057420015335}, 'Angular Velocity': {'Delta q1': 1.430572501703864e-05, 'Delta q0': 1.0, 'Delta q3': 0.00011823892418760806, 'Delta q2': -1.1914789865841158e-05, 'frame': 'ENU', 'gyrZ': 0.011823892593383789, 'gyrX': 0.0014305724762380123, 'gyrY': -0.001191479037515819}, 'Orientation Data': {'Yaw': -99.97016906738281, 'Pitch': 0.07727842777967453, 'frame': 'ENU', 'Roll': -0.43628624081611633}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 26 data bytes: [10 20 02 9E 40 10 60 04 00 AB 3C 2A 30 10 04 00 01 88 EF E0 20 04 00 00 00 85] {'Status': {'StatusWord': 133}, 'Timestamp': {'PacketCounter': 40512, 'SampleTimeFine': 11222058}, 'Pressure': {'Pressure': 100591}} waiting for 1 bytes, got 0 so far: [] waiting for 1 bytes, got 0 so far: [] MT: Got message id 0x36 (MTData2) with 67 data bytes: [88 40 34 11 AD 78 82 00 02 02 1F 07 E3 03 DD 19 85 4A E7 07 55 94 7C 1B 1D C6 EC 00 00 01 CC FF FF FF FC 00 00 00 01 FF FF FF F7 00 00 00 28 00 B1 02 09 00 01 67 22 10 60 04 00 AB 39 91 10 20 02 9E 41] MTException: couldn't parse MTData2 message.

Adixy commented 6 years ago

I edited mtdevice.py script and just put "pass" instead the "raise Exception(" couldn't parse MTData2 message.") thing.

It reads all the sensor data correctly in real time. Probably some typo in the script somewhere that triggers try/except

fcolas commented 6 years ago

@Adixy Interesting. As you can see from the contents of the last message that the driver cannot parse, there is a GPS_SOL message of length 52 (0x34), a SampleTimeFine of length 4, and a PacketCounter of length 2. The latter two are obviously ok but, according to the documentation, the GPS_SOL message should have a length of 49. Note that this message type got deprecated in favour of Position or GNSS types of messages. You can try to switch to one of those.

Anyway, if we wanted to solve this specific issue, we would have to guess what the 52 bytes mean. The easiest explanation is that, somewhere, a 1-byte field has been upgraded to 4 bytes. Looking inside this message is looks ok up to the end. So it might just be that the last reserved byte is actually not a byte but a float (1.28e-40?), an int (91938?) or some other 4-byte flag. I'll try to hack in a fix. But in the end, it's probably not the same issue since OP cannot have such message.

fcolas commented 6 years ago

@Adixy Can you please test the gps_sol_workaround branch?

fcolas commented 5 years ago

@Adixy Ping?