ANAHEIM, Calif. — This is the story of how Robert A. Iger, chief executive of the Walt Disney Company, solved a technology problem — how to bring the new “Star Wars” droid BB-8 to toy shelves and Disney parks — by playing with a ball on his office carpet.

Last summer, Mr. Iger was doing quick homework on Sphero, a Colorado start-up that had been selected to participate in Disney Accelerator, a program pairing entrepreneurs with mentors from Disney’s senior ranks. Sphero is the maker of a $129 smartphone-controlled robotic ball, which can run for more than an hour on a charge and bounce safely down stairs.

“I was impressed with the quality of it, and I was really impressed with the user interface,” Mr. Iger said in a telephone interview late last week.

Then he had an idea. Just before his Sphero ball arrived, he had been poring over the designs for droids created for “Star Wars: The Force Awakens,” the movie arriving in theaters in December. One in particular stood out: BB-8, a beeping, free-rolling, orange and white ball with a little half-sphere hat.