在建地图的过程中发现rviz收进来的 lidar信号的状态一直在error和 ok间乱跳,大概能最多到500帧后就一直错误了,一直显示unknown reason for transform failure.
错误的状态截屏如下:
因为每次重新启动 rviz后总能发现前面一段时间的帧状态还是OK的,后来就一直在 error和OK间跳,跳到最后就一直是error了。
最后发现有个queue size的属性,提示如下:
Queue Size
Advanced: set the size of the incoming LaserScan message queue. Increasing this is useful if your incoming TF data is delayed significantly from your LaserScan data, but it can greatly increase memory usage if the messages are big.
最后将这个参数设置的比较大(200)后发现问题消失了。
以上备忘,也希望能帮助到同样问题的人。
希望对你有用。