Humanoid robots armed with lethal weapons or unmanned tanks and submarines may have seemed like a realm of pure science fiction, just a few years ago.