Robots Help Trains Stay on the Rails