Robots taught to move safely, but not too safely