amcl subscriber queue
I am currently working with the AMCL node and I noticed a spring effect when the robot moves at high speed, I mean that there is a kind of delay in the transformation provided by AMCL node. I initially assumed that my PC was not fast enough, then I tried with a core-i7 but the situation has not improved as hoped. So I took some time to analyze the code and I want to ask you something about it:
at lines 345 + 346 of the amcl_node (http://www.ros.org/doc/api/amcl/html/amcl__node_8cpp_source.html @ line 345 + 346) there are the definitions of the laser subscribers and filters, both with a "queue_size" of 100 messages. In this case, if the laser node publishing frequency is 25hz, this queue will contain a long "history" (4 secs) and if the PC is not fast enough to process every single beam in this queue, this could be the reason of the "spring effect".
I tried to change the value of the queue, I set it to 1 because I think AMCL should take the last laser scan to compute the new pose (not a pose in the past, even if the published transform is future dated).
With this change the spring effect is no longer present, but I would like to understand why the authors of the code put a queue lenght like that, maybe there's something that I have not yet considered.
Thank you! Augusto