Elon Musk says Tesla will start selling Optimus humanoid robots to the public by the end of 2027, pending safety and reliability.