SPARTANBURG, SC—Two humanoid robots have completed an 11-month pilot project at BMW’s assembly plant here.