implemented isCanvasEmpty to control if an obstacle is updated or not