Police in San Francisco have been granted the authority to use killer robots in dangerous situations.