Military powers are racing to develop robotic weapon systems that can operate autonomously while lobbying groups are trying to pre-emptively set up a treaty banning it.