Hokuyo Laser Scan seq not continous
Hi, my robot car has a Jetson tx2 board and a Hokuyo lidar. My car subscribes to the lidar message with a queue size of 1:
_subScan = _nh.subscribe("/scan", 1, &scanCallback, this);
And in the laser scan callback, I just check the scan message seq id, I do not do anything else. However, I found the seq was not continuous, it was like 1084, 1096, 1099, 1100, 1101. Does this mean I was losing scan message? Why? Since I do not do anything else, there should be enough CPU to catch all messages.
Yes you lose messages because the queue size is too low. I'm not sure why exactly though but I would guess it's because you have to empty the queue after every message received and that could induce the message loss.
You just have to increase the queue size to receive all the messages correctly.
I have increase the queue size to 4, but still missing scans