Tesla's Optimus robot will start performing “useful tasks” by the end of this year.