- Drivers Xsens Port Devices Replicator
- Drivers Xsens Port Devices Terminal
- Drivers Xsens Port Devices Lucie
- Drivers Xsens Port Devices Gigabit
We are using the XSENS MTi30 'Motion Tracker Module' here, on a lot of other users' laptops, but I am having no success on mine. When plugged in the USB - serial cable is working, the XSENS supplied programs are seeing the device, it shows up in Device Manager as COM5, BUT. It doesn't show up in MAX or a VISA control in LabVIEW. Driver for xsens IMUs. Contribute to ethz-asl/ethzaslxsensdriver development by creating an account on GitHub.
xsens_driver
ROS Driver for XSens MT/MTi/MTi-G devices.
- Homepage: http://wiki.ros.org/xsens_driver
The xsens_driver package provides mtnode.py, a generic ROS node publishing the data streamed by an XSens motion tracker (MT, MTi, MTi-G...) from third, fourth or fifth generation.
The ROS node is a wrapper around the mtdevice::MTDevice class. It can publish the following topics, depending on the configuration of the device:
/imu/data
(sensor_msgs::Imu): orientation, angular velocity, linear acceleration,/fix
(sensor_msgs::NavSatFix): longitude, latitude, altitude (from filtered/fused GPS and IMU),/raw_fix
(sensor_msgs::NavSatFix): longitude, latitude, altitude (from ONLY GPS),/fix_extended
(gps_common::GPSFix): more complete GPS information than /fix
,/velocity
(geometry_msgs::TwistStamped): angular velocity is in body frame, linear velocity is in world frame and fused with GPS measurement./magnetic
(geometry_msgs::Vector3Stamped): direction of magnetic field,/temperature
(std_msgs::Float32): temperature,/pressure
(std_msgs::Float32): pressure,/analog_in1
(std_msgs::UInt16): first analog input,/analog_in2
(std_msgs::UInt16): second analog input.
It can also publish diagnostics information.
Finally, it always publishes the decoded message as a std_msgs::String representing the Python dictionary on /imu_data_str
.
If the IMU is set to raw mode, the values of the /imu/data
, /velocity
and /magnetic
topics are the 16 bits output of the AD converters and therefore not in usual units.
The covariance information in the sensor_msgs::Imu message are filled with default values from the MTx/MTi/MTi-G documentation but may not be exact; it also does not correspond to the covariance of the internal XKF.
The nodes can take the following parameters:
- ~device (
auto
): the path of the device file to connect to the imu; auto
will look through all serial devices to find the first one. - ~baudrate (0): the baudrate of the IMU (unused for
auto
device); 0 will try to auto-detect baudrate. - ~timeout (0.002): the timeout for communication with the IMU.
- ~initial_wait (0.1): initial wait to allow the device to come up before trying to communicate.
- ~frame_id (
/base_imu
): the frame id of the IMU. - ~frame_local (
ENU
): the desired frame orientation (ENU
, NED
, or NWU
). - ~no_rotation_duration (0): the int duration in seconds of the no-rotation calibration procedure at the start of the node (only for mark iv devices). If 0, the procedure is not launched.
- ~angular_velocity_covariance_diagonal ([0.0004, 0.0004, 0.0004]) diagonal elements of the covariance matrix on the angular velocity published on the
/imu/data
topic. - ~linear_acceleration_covariance_diagonal ([0.0004, 0.0004, 0.0004]) diagonal elements of the covariance matrix on the linear acceleration published on the
/imu/data
topic. - ~orientation_covariance_diagonal ([0.01745, 0.01745, 0.15708]) diagonal elements of the covariance matrix on the orientation published on the
/imu/data
topic.
It might be necessary to add the user to the dialout
group so that the node can communicate with the device.
mtdevice.py can be used on the command line to configure or inspect the current configuration of the device, see usage below.
2 Usage:
4
6 -h, --help
8 -r, --reset
10 -a, --change-baudrate=NEW_BAUD
11 Change baudrate from BAUD (see below) to NEW_BAUD.
13 Configure the device (see OUTPUT description below).
15 Print MTData. It is the default if no other command is supplied.
17 Print current MT device configuration.
19 Change the current XKF scenario.
21 Configure the device in legacy mode (needs MODE and SETTINGS arguments
23 -v, --verbose
25 -y, --synchronization=settings (see below)
26 Configure the synchronization settings of each sync line (see below).
28 Set the UTC time buffer of the device.
30 Change the GNSS navigation filter settings (check the documentation).
32 Set the option flags.
34 Send command to the In-run Compass Calibration.
36 Generic options:
38 Serial interface of the device (default: /dev/ttyUSB0). If 'auto', then
39 all serial ports are tested at all baudrates and the first
41 -b, --baudrate=BAUD
42 Baudrate of serial interface (default: 115200). If 0, then all
43 rates are tried until a suitable one is found.
45 Timeout of serial communication in second (default: 0.002).
47 Initial wait to allow device to be ready in second (default: 0.1).
49 Configuration option:
51 The format is a sequence of '<group><type><frequency>?<format>?'
53 The frequency and format are optional.
55 t temperature (max frequency: 1 Hz):
57 i timestamp (max frequency: 2000 Hz):
59 ip packet counter
61 if sample time fine
63 ir frame range
65 oq quaternion
67 oe Euler angles
69 bp baro pressure
70 a acceleration (max frequency: 2000 Hz (see documentation)):
72 aa acceleration
74 ah acceleration HR (max frequency 1000 Hz)
76 pa altitude ellipsoid
78 pl latitude longitude
80 np GNSS PVT data
82 w angular velocity (max frequency: 2000 Hz (see documentation)):
84 wd delta q
86 g GPS (max frequency: 4 Hz):
88 gs SOL
90 gi SV info
91 r Sensor Component Readout (max frequency: 2000 Hz):
93 rt Gyro temperatures
95 mf magnetic Field
97 vv velocity XYZ
99 sb status byte
101 Frequency is specified in decimal and is assumed to be the maximum
103 Format is a combination of the precision for real valued numbers and
105 precision:
106 f single precision floating point number (32-bit) (default)
107 d double precision floating point number (64-bit)
109 e East-North-Up (default)
111 w North-West-Up
113 The default configuration for the MTi-1/10/100 IMUs can be
115 'wd,ad,mf,ip,if,sw'
117 'wd2000fe,ad2000fe,mf100fe,ip2000,if2000,sw2000'
118 For getting quaternion orientation in float with sample time:
120 For longitude, latitude, altitude and orientation (on MTi-G-700):
122
124 The format follows the xsens protocol documentation. All fields are
126 Note: The entire synchronization buffer is wiped every time a new one
127 is set, so it is necessary to specify the settings of multiple
129 It also possible to clear the synchronization with the argument 'clear'
131 Function (see manual for details):
133 4 Interval Transition Measurement
135 9 ClockBiasEstimation
137 Line (manual for details):
139 1 GPSClockIn (only available for 700/710)
141 4 SyncOut
142 5 ExtTimepulseIn (only available for 700/710)
143 6 Software (only available for SendLatest with ReqData message)
145 1 Positive pulse/ Rising edge
147 3 Both/ Toggle
149 0 multiple times
151 Skip First (unsigned_int):
152 Number of initial events to skip before taking actions
154 Number of events to skip before taking action again
156 Pulse Width (unsigned_int):
158 For SyncOut, the width of the generated pulse in 100 microseconds
160 Delay:
161 Delay after receiving a sync pulse to taking action,
163 Clock Period:
164 Reference clock period in milliseconds for ClockBiasEstimation
166 Offset from event to pulse generation.
167 100 microseconds unit, range [-30000...+30000]
169 Examples:
170 For changing the sync setting of the SyncIn line to trigger indication
171 with rising edge, one time triggering and no skipping and delay. Enter
173 '3,2,1,1,0,0,0,0'
175 Note a number is still in the place for pulse width despite it being
177
179 ./mtdevice.py -y 3,2,1,0,0,0,0,0 -y 9,0,1,0,0,0,10,0
181 To clear the synchronization settings of MTi
183
185 There are two ways to set the UTCtime for the MTi.
186 Option #1: set MTi to the current UTC time based on local system time with
188 Option #2: set MTi to a specified UTC time
190 year: range [1999,2099]
192 day: day of the month, range [1,31]
194 min: minute of the hour, range [0,59]
196 ns: nanosecond of the second, range [0,1000000000]
198 1: Valid Time of Week
200 4: valid UTC
201 Note: the flag is ignored for --utc-time as it is set by the device
203
205 Set UTC time for the device:
207 ./mtdevice.py -u 1999,1,1,0,0,0,0,0
209 GNSS platform settings:
211 The following two platform settings are listed in the documentation:
213 8: Airbone <4g
214 Check the XSens documentation before changing anything.
216 Option flags:
218 0x00000001 DisableAutoStore: when set, configuration changes are not saved
220 0x00000002 DisableAutoMeasurement: when set, device will stay in Config
222 0x00000004 EnableBeidou: when set, enable Beidou and disable GLONASS (only
224 0x00000010 EnableAHS: enable Active Heading Stabilization (overrides
226 0x00000080 EnableInRunCompassCalibration: doc is unclear
227 The flags provided must be a pair of ored values: the first for flags to be
229 Examples:
230 Only set DisableAutoStore and DisableAutoMeasurement flags:
232 Disable AHS (clear EnableAHS flag):
234 Set DisableAutoStore and clear DisableAutoMeasurement:
236
238 The idea of ICC is to record magnetic field data during so-called
239 representative motion in order to better calibrate the magnetometer and
241 Typical usage would be to issue the start command, then move the device
242 for some time then issue the stop command. If parameters are acceptable,
243 these can be stored using the store command.
245 00: Start representative motion
Drivers Xsens Port Devices Replicator
246 01: Stop representative motion; return ddt, dimension, and status.
248 03: Get representative motion state; return 1 if active
250
252 -m, --output-mode=MODE
253 Legacy mode of the device to select the information to output.
254 This is required for 'legacy-configure' command.
255 MODE can be either the mode value in hexadecimal, decimal or
256 binary form, or a string composed of the following characters
258 t temperature, [0x0001]
260 o orientation data, [0x0004]
262 p position data (requires MTi-G), [0x0010]
264 s status data, [0x0800]
266 r raw (incompatible with others except raw GPS), [0x4000]
267 For example, use '--output-mode=so' to have status and
269 -s, --output-settings=SETTINGS
270 Legacy settings of the device. This is required for 'legacy-configure'
272 SETTINGS can be either the settings value in hexadecimal,
273 decimal or binary form, or a string composed of the following
275 t sample count (excludes 'n')
277 u UTC time
278 q orientation in quaternion (excludes 'e' and 'm')
279 e orientation in Euler angles (excludes 'm' and 'q')
280 m orientation in matrix (excludes 'q' and 'e')
282 G rate of turn in calibrated data
284 i only analog input 1 (excludes 'j')
286 N North-East-Down instead of default: X North Z up
287 For example, use '--output-settings=tqMAG' for all calibrated
288 data, sample counter and orientation in quaternion.
290 Sampling period in (1/115200) seconds (default: 1152).
291 Minimum is 225 (1.95 ms, 512 Hz), maximum is 1152
293 Note that for legacy devices it is the period at which sampling occurs,
294 not the period at which messages are sent (see below).
296 Deprecated options:
298 Only for mark III devices.
299 Number of samples to skip before sending MTData message
301 The frequency at which MTData message is send is:
303 If the value is 0xffff, no data is send unless a ReqData request
- Note
- SW Release Applicability: This sample is available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.
The IMU Logger sample works with any serial port (UART) based IMU sensor or with the Xsens IMU device connected over USB. The logger requires the IMU sensor connected over serial port to deliver messages in NMEA format, while the Xsens device can run in proprietary mode.
Interfacing with sensors
Serial
Consumer grade off-the-shelve IMU sensors are usually connected over USB and implement a serial-to-USB connection with the help of FTDI devices. The Xsens IMU device can be connected through a serial-to-USB connection.
On Linux, these sensors can then be reached over the /dev/ttyUSB
or /dev/ttyACM
devices. Before trying out the sample, ensure the user has access to the serial device. You can do so by trying to read from the device e.g. with cat /dev/ttyACMx
, and if permission is denied, add the current user to the dialout
group and then log out/in again:
On QNX, prior to accessing the device, launch the dev-serusb
driver as follows:
The serial devices can the be reached over the /dev/serusb
devices.
Xsens USB
The Xsens IMU device can also be connected directly over USB, but is only supported on Linux.
The sample requires the driver and name of the device of the IMU sensor.
The IMU Logger sample, sample_imu_logger, accepts the following parameters:
Where:
- Note
- For a full list of key/value pairs that can be passed to –params see Sensor Enumeration Sample.
Examples
Drivers Xsens Port Devices Terminal
NMEA format
For serial devices transmitting messages in NMEA format, use the imu.uart
driver. For example:
Per default, if no baud
parameter has been provided imu.uart
driver assumes a baudrate of 9600. In order to change the baudrate provide baud
argument as:
On QNX, the baudrate is set when starting devc-serusb
. The baud
parameter will be ignored.
Drivers Xsens Port Devices Lucie
Xsens proprietary format
The sample supports reading IMU packets from a Xsens device through the imu.xsens
driver. To run the sample using Xsens over USB device use:
Drivers Xsens Port Devices Gigabit
Where device=0
parameter sets the index of the Xsens device (usually 0 if only one device is installed) and frequency=100
sets the frequency in [Hz]
this device should operate with.
To run the sample using Xsens over serial use:
Please note that even if the Xsens device is a shared device, like Xsens MTi-G-700, capable of delivering GPS and IMU packets, only the IMU packets will be parsed by the imu.xsens
driver.
- Note
- If the device is connected to Xavier UART you need also specify –stop-bits=1
For every valid IMU message that the sample receives, it prints to the console data such as:
Where the first number indicates the timestamp of the received IMU message in microseconds and the rest of the line indicates the IMU information of the sensor.
For more details see IMU.