bluespace-ai/bluespace_ai_xsens_ros_mti_driver

High Frequency Reading is buffered

Closed this issue · 2 comments

The high-frequency topics are being buffered at 100hz.
here is an example with an unmodified driver with the provided launch file:

  • /imu/acceleration is about 55hz
  • /imu/time_ref was fluctuating around 500~650hz on topic monitor but being clustered(buffered) instead of being evenly spread
    image

bash dump:

ros2 launch bluespace_ai_xsens_mti_driver xsens_mti_node.launch.py                                                                                                           02:52:30 PM
[INFO] [launch]: All log files can be found below /home/cniuser/.ros/log/2024-08-15-14-54-00-777861-cnidesktop1-290578
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [xsens_mti_node-1]: process started with pid [290579]
[xsens_mti_node-1] RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED is now ignored. Please set RCUTILS_LOGGING_USE_STDOUT and RCUTILS_LOGGING_BUFFERED_STREAM to control the stream and the buffering of log messages.
[xsens_mti_node-1] [INFO] [1723726440.850105276] [xsens_mti_node]: Creating XsControl object...
[xsens_mti_node-1] [INFO] [1723726440.856980246] [xsens_mti_node]: Scanning for devices...
[xsens_mti_node-1] [INFO] [1723726441.255392271] [xsens_mti_node]: Found a device with ID: 03887B6D @ port: /dev/ttyUSB0, baudrate: 921600
[xsens_mti_node-1] [INFO] [1723726441.255443157] [xsens_mti_node]: Opening port /dev/ttyUSB0 ...
[xsens_mti_node-1] [INFO] [1723726441.502214918] [xsens_mti_node]: Device: MTi-3-8A7G6, with ID: 03887B6D opened.
[xsens_mti_node-1] [INFO] [1723726441.554242353] [xsens_mti_node]: Measuring ...

The same happens when enabling /imu/acceleration_high_rate at 500hz
Screenshot from 2024-08-15 13-14-47

          > setserial /dev/ttyUSB0 low_latency

this essentially solves the issue upto 500hz without fiddling around with source code.
500hz_setusb_lowlatency_Screenshot from 2024-08-20 12-15-44

But at 1000hz, things are again buffered at around 500hz
1Khz_setserial_lowlatency_Screenshot from 2024-08-20 12-49-04

Originally posted by @ahmadSum1 in xsenssupport/Xsens_MTi_ROS_Driver_and_Ntrip_Client#3 (comment)