revised getWallDist function for laser scanner