A robot is not an industry, nor is it a person. But a single robots acts and makes choices, like a human does but a car does not. With cars, we require certain hardware and design features to promote safety, and we heavily regulate the behavior of drivers. When drivers break the rules and cause problems doing so, they are fined or otherwise punished.
You can't punish a robot, and it makes no sense to punish a human who gave adequate instructions to a robot he or she did not build and program. What you can do is say, "Whoever writes the software for the robot is responsible for making sure that when executed the robot will behave in this way." Different companies will turn that into code in different ways.
So yes, I am proposing regulating the design and construction of robots, but the mechanism in law for doing so is going to look, from the outside, like regulating behavior, because it is the behavior and not the code itself we care about.