Combining probabilities, failures and safety in robot control