Description
我在我自己的slam工程中移植了carto中的voxel_filter算法,用于激光点滤波,但是我发现自身工程中的Voxel耗时大约为50ms,而carto的耗时却只为0.5-2ms。carto中的Voxl filter快了几十倍。
这个测试我是在同一台机器上对比的不同代码,并且也在多台机器上做过验证。同时所用来测试的bag数据也是相同的。并且我也详细、完成的对比过代码上的细微差异,并排除了代码差异带来的影响。
更进一步的我在carto前端中加入了一个简单的for循环计数测试,carto的计算速度都要比我自己的工程要快几倍,请问这是什么原因?
I have ported the Voxel-filter algorithm from Carto to my own SLAM project for laser point filtering, but I found that the Voxel time in my own project is about 50ms, while Carto's time is only 0.5-2ms. The Voxl filter in Carto is dozens of times faster.
I compared different codes on the same machine for this test and have also verified it on multiple machines. The bag data used for testing is also the same. And I also compared the subtle differences in the code in detail and eliminated the impact of code differences.
Furthermore, I have added a simple for loop counting test to the front-end of Carto. Carto's calculation speed is several times faster than my own project. May I ask what is the reason for this?