ethz-asl / ethzasl_xsens_driver

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

Driver Node publish topics at different Interval #100

Open zhouzhiqian opened 5 years ago

zhouzhiqian commented 5 years ago

When I use MTI300 on Ubunty 16.04 + ROS kinetic, the intervals between every two topics don't keep 5ms (its frequency is 200 Hz).
Just like this figure: 16 04

But when I use it on Ubunty 14.04 + ROS indigo, it shows a totally different result. mti300

)

fcolas commented 5 years ago

That's a new issue for me. Does it happen consistently or just sometimes (and if so, in which condition)? I assume you checked it was not a CPU performance issue and only run the mtnode to reduce outside influences. Is it the same system with two different installs or are there differences in the CPU/USB bus?

MichalNowicki commented 5 years ago

I experienced this issue on a similar configuration and in our case, it was caused by the latency settings of the Ubuntu driver for FTDI. The solution was to set the low_latency mode of the driver and thus prevent it from accumulating multiple measurements.

The command to execute after the device was plugged in: setserial /dev/<tty_name> low_latency

The setting resets once the device is disconnected but udev rules can be used to make it permanent.

zhouzhiqian commented 5 years ago

@MichalNowicki Thank you very much. I will try your solution quickly.

artemiialessandrini commented 5 years ago

Hi, I am having the same issue of publisjing with different interval partially:

image

While trying to setserial /dev/ttyUSB0 low_latency, I get: Cannot get serial info: Inappropriate ioctl for device

artemiialessandrini commented 5 years ago

@zhouzhiqian was it a solution for you?

artemiialessandrini commented 5 years ago

Apparently, rosbag_validate displays the same ERROR: E1008 14:32:31.060365 31665 rosbag_validate_main.cc:389] IMU data (frame_id: "imu_link") has a large gap, largest is 0.660078 s, recommended is [0.0005, 0.005] s with no jitter.