Perceiving, learning, and exploiting object affordances for autonomous pile manipulation