As robots smarten up, they are more likely to collaborate with humans than replace them.