reinitialize grid only if waypoints list is not empty
first argument in listener function is event, message is second one