Learning, Transfer and Use of Affordances in Robotics Tasks