Using the concept of reversibility to develop safe behaviours in robotics