ethz-asl / ethzasl_xsens_driver

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

No linear velocity and angular data on the MTi device #94

Closed aaravrav142 closed 5 years ago

aaravrav142 commented 5 years ago

Hi, I am using the newest version of MTi 30 AHRS bought just a few weeks ago.

I can see the position data (x,y and z) but the node does not publish the velocity data (linear and angular).

Below is the device information:

$ rosrun xsens_driver mtdevice.py -i
Device: /dev/ttyUSB0 at 115200 Bd:
  device ID:  0x0368248C
  product code: 'MTi-30-2A8G4'
  firmware revision: (1, 7, 2)
  baudrate: 2
  error mode:  message unsupported by your device.
  option flags:  0x00000000
  location ID:  0x0000
  transmit delay:  message unsupported by your device.
  synchronization settings:  []
  general configuration: {   'Master device ID': 57156748,
    'date': '\x00\x00\x00\x00\x00\x00\x00\x00',
    'device ID': 57156748,
    'length': 0,
    'number of devices': 1,
    'output-mode': 0,
    'output-settings': 0,
    'period': 1152,
    'skipfactor': 0,
    'time': '\x00\x00\x00\x00\x00\x00\x00\x00'}
  output configuration (mark IV devices):  [(0x1060, 65535), (0xE020, 65535), (0x2030, 100)]
  string output type: 0
  period: 1152
  alignment rotation sensor: (0, (1.0, 0.0, 0.0, 0.0))
  alignment rotation local: (1, (1.0, 0.0, 0.0, 0.0))
  output mode:  message unsupported by your device.
  extended output mode:  0x0000
  output settings:  message unsupported by your device.
  GPS coordinates (lat, lon, alt): (52.24049169408207, 6.838216771186439, 0.0)
  available scenarios: [   (39, 15, 'general'),
    (40, 15, 'high_mag_dep'),
    (41, 15, 'dynamic'),
    (42, 15, 'low_mag_dep'),
    (43, 15, 'vru_general')]
  current scenario ID: 39
  UTC time: (0, 1970, 1, 1, 0, 0, 0, 0)

and

$ rosrun xsens_driver mtdevice.py -v -i
MT: Write message id 0x30 (GoToConfig) with 0 data bytes: []
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: [03 68 24 8C 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 03 68 24 8C 00 00 00 00 00 00 00 00 00 27 01 07 02 49 05 01]
Device: /dev/ttyUSB0 at 115200 Bd:
  device ID:  MT: Write message id 0x00 (ReqDID) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x01 (DeviceID) with 4 data bytes: [03 68 24 8C]
0x0368248C
  product code:  MT: Write message id 0x1C (ReqProductCode) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x1D (ProductCode) with 20 data bytes: [4D 54 69 2D 33 30 2D 32 41 38 47 34 20 20 20 20 20 20 20 20]
'MTi-30-2A8G4'
  firmware revision:  MT: Write message id 0x12 (ReqFWRev) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x13 (FirmwareRev) with 11 data bytes: [01 07 02 00 00 00 2A 00 00 FD 87]
(1, 7, 2)
  baudrate:  MT: Write message id 0x18 (SetBaudrate) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x19 (SetBaudrateAck) with 1 data bytes: [02]
2
  error mode:  MT: Write message id 0xDA (SetErrorMode) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x42 (Error) with 5 data bytes: [04 00 00 00 00]
message unsupported by your device.
  option flags:  MT: Write message id 0x48 (SetOptionFlags) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x49 (SetOptionFlagsAck) with 4 data bytes: [00 00 00 00]
0x00000000
  location ID:  MT: Write message id 0x84 (SetLocationID) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x85 (SetLocationIDAck) with 2 data bytes: [00 00]
0x0000
  transmit delay:  MT: Write message id 0xDC (SetTransmitDelay) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x42 (Error) with 5 data bytes: [04 00 00 00 00]
message unsupported by your device.
  synchronization settings:  MT: Write message id 0x2C (SetSyncSettings) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x2D (SetSyncSettingsAck) with 0 data bytes: []
[]
  general configuration:  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: [03 68 24 8C 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 03 68 24 8C 00 00 00 00 00 00 00 00 00 27 01 07 02 49 05 01]
{   'Master device ID': 57156748,
    'date': '\x00\x00\x00\x00\x00\x00\x00\x00',
    'device ID': 57156748,
    'length': 0,
    'number of devices': 1,
    'output-mode': 0,
    'output-settings': 0,
    'period': 1152,
    'skipfactor': 0,
    'time': '\x00\x00\x00\x00\x00\x00\x00\x00'}
  output configuration (mark IV devices):  MT: Write message id 0xC0 (SetOutputConfiguration) with 0 data bytes: []
MT: Got message id 0xC1 (SetOutputConfigurationAck) with 12 data bytes: [10 60 FF FF E0 20 FF FF 20 30 00 64]
[(0x1060, 65535), (0xE020, 65535), (0x2030, 100)]
  string output type:  MT: Write message id 0x8E (SetStringOutputType) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x8F (SetStringOutputTypeAck) with 2 data bytes: [00 00]
0
  period:  MT: Write message id 0x04 (SetPeriod) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x05 (SetPeriodAck) with 2 data bytes: [04 80]
1152
  alignment rotation sensor:  MT: Write message id 0xEC (SetAlignmentRotation) with 1 data bytes: [00]
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0xED (SetAlignmentRotationAck) with 16 data bytes: [3F 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00]
(0, (1.0, 0.0, 0.0, 0.0))
  alignment rotation local:  MT: Write message id 0xEC (SetAlignmentRotation) with 1 data bytes: [01]
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0xED (SetAlignmentRotationAck) with 16 data bytes: [3F 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00]
(1, (1.0, 0.0, 0.0, 0.0))
  output mode:  MT: Write message id 0xD0 (SetOutputMode) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x42 (Error) with 5 data bytes: [04 00 00 00 00]
message unsupported by your device.
  extended output mode:  MT: Write message id 0x86 (SetExtOutputMode) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x87 (SetExtOutputModeAck) with 2 data bytes: [00 00]
0x0000
  output settings:  MT: Write message id 0xD2 (SetOutputSettings) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x42 (Error) with 5 data bytes: [04 00 00 00 00]
message unsupported by your device.
  GPS coordinates (lat, lon, alt):  MT: Write message id 0x6E (SetLatLonAlt) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x6F (SetLatLonAltAck) with 24 data bytes: [40 4A 1E C8 6E 8C 85 64 40 1B 5A 55 7F 4C D1 61 00 00 00 00 00 00 00 00]
(52.24049169408207, 6.838216771186439, 0.0)
  available scenarios:  MT: Write message id 0x62 (ReqAvailableScenarios) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x63 (AvailableScenarios) with 110 data bytes: [27 0F 67 65 6E 65 72 61 6C 20 20 20 20 20 20 20 20 20 20 20 20 20 28 0F 68 69 67 68 5F 6D 61 67 5F 64 65 70 20 20 20 20 20 20 20 20 29 0F 64 79 6E 61 6D 69 63 20 20 20 20 20 20 20 20 20 20 20 20 20 2A 0F 6C 6F 77 5F 6D 61 67 5F 64 65 70 20 20 20 20 20 20 20 20 20 2B 0F 76 72 75 5F 67 65 6E 65 72 61 6C 20 20 20 20 20 20 20 20 20]
[   (39, 15, 'general'),
    (40, 15, 'high_mag_dep'),
    (41, 15, 'dynamic'),
    (42, 15, 'low_mag_dep'),
    (43, 15, 'vru_general')]
  current scenario ID:  MT: Write message id 0x64 (SetCurrentScenario) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x65 (SetCurrentScenarioAck) with 2 data bytes: [00 27]
39
  UTC time:  MT: Write message id 0x60 (SetUTCTime) with 0 data bytes: []
waiting for 1 bytes, got 0 so far: []
MT: Got message id 0x61 (UTCTime) with 12 data bytes: [00 00 00 00 07 B2 01 01 00 00 00 00]
(0, 1970, 1, 1, 0, 0, 0, 0)

Data from the rostopic echo /imu/data

---
header: 
  seq: 12047
  stamp: 
    secs: 1541144646
    nsecs: 266166925
  frame_id: "/imu"
orientation: 
  x: -0.000635412115275
  y: -0.00672364858779
  z: 0.0997764499171
  w: 0.994986959132
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12048
  stamp: 
    secs: 1541144646
    nsecs: 276396989
  frame_id: "/imu"
orientation: 
  x: -0.000628137789118
  y: -0.00672754310088
  z: 0.0998070495583
  w: 0.994983868445
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12049
  stamp: 
    secs: 1541144646
    nsecs: 286318063
  frame_id: "/imu"
orientation: 
  x: -0.000664451601761
  y: -0.00676094916069
  z: 0.0998375440879
  w: 0.994980559037
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12050
  stamp: 
    secs: 1541144646
    nsecs: 296174049
  frame_id: "/imu"
orientation: 
  x: -0.000687652946718
  y: -0.00674713982071
  z: 0.0999619142403
  w: 0.994968149711
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12051
  stamp: 
    secs: 1541144646
    nsecs: 306202888
  frame_id: "/imu"
orientation: 
  x: -0.000676694528001
  y: -0.00677021941139
  z: 0.100070749277
  w: 0.994957060055
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12052
  stamp: 
    secs: 1541144646
    nsecs: 316088914
  frame_id: "/imu"
orientation: 
  x: -0.000645982295998
  y: -0.00674878448721
  z: 0.100159188976
  w: 0.994948327039
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12053
  stamp: 
    secs: 1541144646
    nsecs: 326086997
  frame_id: "/imu"
orientation: 
  x: -0.00069290340196
  y: -0.00673701971074
  z: 0.100247146095
  w: 0.99493951683
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---
header: 
  seq: 12054
  stamp: 
    secs: 1541144646
    nsecs: 336143016
  frame_id: "/imu"
orientation: 
  x: -0.000673421295964
  y: -0.00672165573111
  z: 0.100306365918
  w: 0.99493366553
orientation_covariance: [0.01745, 0.0, 0.0, 0.0, 0.01745, 0.0, 0.0, 0.0, 0.15708]
angular_velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
angular_velocity_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
linear_acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
linear_acceleration_covariance: [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0]
---

How do I solve this? Thanks

snakehaihai commented 5 years ago

go to windows. Download xsense MT suit.
$ At sensor config tab increase baudrate to 921600. $ At output config tab. enable delta \Delta t and delta \Delta v acceleration.

REMEMBER to APPLY and SAVE to MT before close

also remember to close this issue afterward

aaravrav142 commented 5 years ago

I do not have access to the sensor right now. I will report back soon. Thanks for the info.

snakehaihai commented 5 years ago

OK do remember to uncheck other output such as 2000hz raw output and compass. only check orientation, delta q and acceleration which the one you needed at 400hz

fcolas commented 5 years ago

Note that you don't have to got to Windows and use the XSens configuration suite since you can use mtdevice.py to configure your IMU from the command line.