added some changes to support my sliding window gmapping