I think you’ll be able to fuck one long before it carries a gun in a serious way.
More seriously, gun toting autonomous platforms are already in use - no human form is required. Sure there is a human in the loop - for now. But even on things like our last generation of cluster munitions from 20 years ago they could select their own targets on the way down (no human in the loop after the thing was dropped).
There are at least 5 countries with stated full autonomous, no human intervention weapons, that are presumably active right now. It is widely suspected there are many more.
More seriously, gun toting autonomous platforms are already in use - no human form is required. Sure there is a human in the loop - for now. But even on things like our last generation of cluster munitions from 20 years ago they could select their own targets on the way down (no human in the loop after the thing was dropped).