SteveMacenski / slam_toolbox

Slam Toolbox for lifelong mapping and localization in potentially massive maps with ROS
GNU Lesser General Public License v2.1
1.67k stars 525 forks source link

Add no_tcpdelay_for_scan_topic parameter #437

Closed rfeistenauer closed 3 years ago

rfeistenauer commented 3 years ago

Adding parameter to be able to remove occasional delay in scan topic

Info Add parameter to disable nagle's algorithm in tcp communication
Ticket(s) this addresses ...
Primary OS tested on Ubuntu
Robotic platform tested on ...

Description of contribution in a few bullet points

Description of documentation updates required from your changes

Future work that may be required in bullet points

Reason

During the investigation of some artifacts in maps generated with our scanner we realized the 20ms jitter in the ros topic and were able to trace the origin back to the nagle's algorithm. This is some tcp optimization which basically holds smaller massages back as long as other messages are still not confirmed. This algorithm can in cpp only be deactivated by the subscriber => in for example the slam_toolbox. This jitter was in the end not the reason for those artefacts in the map generation, but we are still wondering if you ever considered if or how it affects the localization and or map generation.

SteveMacenski commented 3 years ago

This jitter was in the end not the reason for those artefacts in the map generation, but we are still wondering if you ever considered if or how it affects the localization and or map generation.

Nope it shouldn't. We use everything to be carefully timestamped and use those timestamps to transform poses into the correct frames to give to the slam problem along side the data. Given SLAM runs only every few seconds / after moving N meters, 20ms is really not anything worth optimizing for here.

Closing PR, but thanks for the contribution, just doesn't actually impact the program's performance and adds a feature that isn't begging a tangible problem.