How can I get Xsens IMU data which set own setting

Hardware environment
-DRIVE AGX Xavier
-IMU: Xsens MTi-G-710

Software
-SDK: DriveWorks SDK Reference 2.2.3134
-IMU Sample: driveworks/samples/src/sensors/imu

I want to use the IMU Sample application to get the data checked in “imu_setting.png”.
(The image is the result of checking the settings with “mtmanager”.)


However, after starting the sample application with the following command, I checked the IMU settings,
It was changed to the setting to output the data checked in “imu_setting (after_starting_app).png”.

Command:
./sample_imu_logger --driver=imu.xsens --params=device=/dev/ttyTHS1,frequency=10,stop-bits=1,baudrate=115200

Question:
-Does the driver(imu.xsens) change the IMU setting inside? (I don’t want to be changed the setting by the driver.)
-How can I get the data which is set by my setting shown in “imu_setting.png” in the IMU Sample application?

Hi @N.Miya,

We are checking internally. At the same time, may I know why you need the configuration and what’s the most important setting for you? Please try if 25->10 Hz change is caused by “frequency=10” in your command line.

Hi @VickNV,

I have the same IMU in another system and am porting that system to AGX.
So, the most inportant setting is delta quaternion and velocity.

thank you.

Please run with below command line (adding slave=1) to skip the configuration.
./sample_imu_logger --driver=imu.xsens --params=device=/dev/ttyTHS1,frequency=10,stop-bits=1,baudrate=115200,slave=1

Thank you for your replay @VickNV,

I ran that command, but the settings were overwritten.
slave_1.txt (6.3 KB)

Do I need to set anything other than “slave=1”?
What does the “slave=1” option do?

“slave=1” will skip device configuration of like below.

void EndpointXsens::initializeDevice(bool slave)
{
if (!slave)
{
configureDevice();
}

May I know how you told setting was changed by sample_imu_logger? Thanks!

indent preformatted text by 4 spacesMay I know how you told setting was changed by sample_imu_logger? 

This is being confirmed by the person in charge.

I have a Additional question.
I want to get the imu data connected by UART with Xavier B.
But I can’t find /dev/tyTHS1 port for Xavier B.
Can I get the IMU data using the Xavier B UART?

Why do you need to connect it to Xavier B? It looks disabled in device tree.

$ cat /proc/device-tree/serial@3110000/status
disabled

I want to record sensor data on SSD connected by ESATA.
However, I heard that esata can only be accessed via Xavier B.
How do I enable the serial?

Please follow below snippet of /usr/local/driveworks/tools/capture/configs/rwd/hyperion7_1/release.json to record with USB. Thanks!

            {
                "name": "imu:xsens",                                                                                                                                                                      
                "nominalSensor2Rig": {
                    "quaternion": [
                        0.0,
                        0.0,
                        0.0,
                        1.0
                    ],
                    "t": [
                        -0.2,
                        -0.1,
                        0.4
                    ]
                },
                "parameter": "device=/dev/ttyUSB0,baudrate=230400,stop-bits=1,slave=true,file-buffer-size=8192,index_table=off",
                "properties": null,
                "protocol": "imu.xsens"
            }, 

Thank you!

May I know how you told setting was changed by sample_imu_logger?

I checked again if the setting changed with slave = 1, but it seems to change.
I checked the data output before and after starting sample_imu_logger.


-> MT manager before executing sample_imu_logger (setting and received data).

-> MT manager after executing sample_imu_logger (settings and received data).
sample_app_slave=1.log|attachment (6.0 KB)
-> sample_imu_logger commands and logs.

Could you try with “slave=true”? Thanks!

Thank you for your reply.

I would like to try “slave = true” today.
Please wait for the result.

This is an additional question.

I’m trying to get the RAW data of the IMU, but I can’t get only the Xbus message.
I’ve modified the IMU logger sample and attached the code and binaries to get the RAW data.

code: main.cpp
binary: sample_imu_logger
command: $./sample_imu_logger --driver=imu.xsens --params=device=/dev/ttyUSB0,frequency=25

In this modified software, the first 50 frames acquired are output to a file.
For example, the following is the result of the first frame.
I want to get only the data (Xbus message) starting with [0xFA, 0xFF, 0x36 …], but
It looks like there is unnecessary data around it.

How can I keep getting only the latest Xbus messages with dwSensor_readRawData ()?

[example: first frame]
$ od -tx1 imu_raw_data_0.bin
0000000 00 01 00 00 93 40 00 00 00 bf 7c f8 98 00 00 00
0000020 00 40 23 96 8e 80 00 00 00 c0 23 18 bf d9 5f 8c
0000040 40 00 00 00 3f f2 bc 09 20 00 00 00 3f f2 e9 06
0000060 60 00 00 00 80 23 18 bf 5d f7 e5 40 00 00 01 bf
0000100 5a 94 44 c0 00 00 00 bf 42 92 01 c0 00 00 00 28
0000120 fa ff 36 87 10 10 0c 23 9e a7 00 07 df 0a 12 00
0000140 00 04 f0 10 20 02 13 29 10 60 04 01 ae a7 f4 20
0000160 33 18 bf c2 50 d0 20 00 00 00 3f 62 96 48 c0 00
0000200 00 00 bf ae d7 6b 40 00 00 00 40 23 18 bf 93 54
0000220 25 00 00 00 00 bf 75 cb 29 c0 00 00 00 40 23 96
0000240 40 60 00 00 00 c0 23 18 bf d9 5f 7f 80 00 00 00
0000260 3f f2 c0 07 00 00 00 00 3f f2 eb 16 c0 00 00 00
0000300 80 23 18 bf 65 51 72 a0 00 00 00 bf 54 2d 81 40
0000320 00 00 01 bf 40 9f 2d 20 00 00 00 63 fa ff 36 7c
0000340 70 10 5e 00 00 08 ca 07 df 0a 12 00 00 02 f0 ff
0000360 ff ff ff 0e e6 b2 80 00 00 00 00 00 00 00 00 00
0000400 00 00 00 00 00 00 00 00 82 34 49 c7 f0 ae 05 00

20200910_imu_rawdata.zip (60.4 KB)

Are you asking about the first 80 bytes data in your first frame? Can you see the same with any xsens tools?

Yes. It refers to the first 80 bytes.
And the last 52 bytes also look like unnecessary data.

Can you see the same with any xsens tools?

The data collected by MT manager is attached. 20200909_imu_mtmanager.txt (850.8 KB)
Looking at this, the MT manager seems to keep only taking Xbus messages.

20200909_imu_mtmanager.txt seems not raw data.
Is there any way you can get raw data by xsens tool and crosscheck it? And could you also to try to get xsens’ advice at the same time? Thanks!