Elon Musk is eager to transform Tesla Inc. into a robotics and artificial intelligence company, but the electric-vehicle ...