Many people keep pet dogs and yet there are recorded cases of pet dogs killing people. The risk is judged by pet dog owners to be a very slight one and so usually ignored. Dogs, it seems, have nature build into their brains a firm instruction that they don’t injure humans.
In the case of humanoid robots, they start with emptiness in their programs and need have built into these programmes instructions that make it impossible to harm humans and many life forms in any way.
We protect ourselves against informed use injury in the gadgets we employ regularly (humanoid robots is about to be one class) by setting up standards associations manned by competent staff and appropriate skilled volunteers. Such will be necessary and have the power of law when we come to want to use humanoid robots.
Much research is being done into the structure of humanoid robots. We need to be sure this is matched with appropriate standards that are backed by law.