@Alex-Kushleyev Hi again, Sorry to keep spamming. I just wanted to make sure this is up-to-date as I progress.
A bit silly I didn't realize before, but I think the problem lies in the FIFO buffer reading vs IMU queue size in the voxl-mpa-to-ros
, that being said the conversion from pipe to ros also costs some latency it seems.
In voxl-mpa-to-ros
, there is the following
m_rosPublisher = m_rosNodeHandle.advertise<sensor_msgs::Imu>(topicName, 1);
Given that the FIFO buffer (with default settings) reads 10 IMU messages at a time, I think this should be changed to
m_rosPublisher = m_rosNodeHandle.advertise<sensor_msgs::Imu>(topicName, 25);
so it has a little extra depending on what happens. This results in a very large improvement:
Getting data from log0004 and data_incr_queue.bag
voxl-logger
mean: 0.9766417070988479 ms
std dev: 0.0014018018261035131 ms
total messages: 61363
rosbag record
mean: 0.9766411567432235 ms
std dev: 0.02937541759378401 ms
total messages: 59305
although you can see there are still some dropped measurements and still a worsening of the standard deviation. I realized the IMU reading can also directly publish to ros from the voxl-imu-server
, and this seems a little more benefit as well
rosbag record
mean: 0.9768075697417741 ms
std dev: 0.012558722853297727 ms
total messages: 61147
still not totally without message dropping. This also still has some worsening about the standard deviation, I wonder if that's simply due to the conversion in _clock_monotonic_to_ros_time
.