这是因为实际的激光扫描的点数较多,比设置的2048要多,所以,在文件目录openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h文件中,#define LASER_MAXBEAMS 2048设置要比实际激光点数大即可。
修改完后需要重新编译。