George Lucas apparently admitted that the inspiration behind the "look" of R2-D2 was the trio of Huey, Louie, and Dewey from Doug Trumbull's film Silent Running , which was released five years before A New Hope .
Los Angeles Times , 5 Dec 1977 ...
The drones, by the way, proved to be director George Lucas' inspiration for his own stubby robot, R2-D2, a fact that he admitted to [Doug] Trumbull when he approached him about contributing to Star Wars.
Trumbull, however, turned down the assignment because he did not want to repeat himself by returning to another space opera... Also this interesting tidbit:
According to a August 14, 1981 Hollywood Reporter article, Universal sued Twentieth Century-Fox, claiming that the droid "R2-D2" in Star Wars was an infringement upon the design of drones Huey, Dewey and Louie.
Judge Irving Hill of the U.S. District Court in Los Angeles dismissed the case before trial, however, stating that "no one has a monopoly on the use of robots in art," and that the robots in question were not similar.
Universal appealed the decision, but the Court of Appeals also dismissed the case.
( Source for Excerpts )
scifi.stackexchange.com/users/40294/Praxis
Not to discredit any of these answers but to augment them, we must recall that though George Lucas came up with the character and guidelines for the design, it was Ralph McQuarrie who designed R2-D2.
We must consider his inspiration as much, if not more, than Lucas contributions to the look of the character.
Star Wars Insider once asked McQuarrie about the design of the droids in Star Wars .
SW Insider :
Did the script describe the droids or was their look something you came up with?
McQuarrie : I think Artoo was just described as a small robot.
I thought of him as running on a giant ball bearing — just a sphere, a circle, wheel-like.
He had gyros so he could go in any direction on this ball.
( Source )
Subsequently, some of the earliest variations of R2-D2 looked like a droid setting on top of a sphere just as McQuarrie mentioned in the interview.
However, due to technical limitations of the time this concept of Artoo had to be reworked into something slightly different and similar to the droid we all know and recognize today.
Also worth noting, much of Ralph's early work that wasn't utilized for the trilogy was used during the design of The Force Awakens and this sketch eventually became the inspiration for BB-8.
As you can see this concept is quite different than the Huey, Louie, and Dewey droids in Silent Running that was referenced by Praxis provided answer and is somewhat similar to the D2 Rainbow vacuum cleaner referenced by Charles Coffey .
So is the vacuum an inspiration to Artoo?
We don't know!
Possibly, possibly not.
It's also worth mentioning that before moving to Hollywood, Ralph worked for Boeing as a technical illustrator.
He was likely inspired by the streamlined look of many of the air and space craft that he helped illustrate while at Boeing.
So what was the inspiration of Artoo?
Very likely pseudo-robotic looking devices of the 70s, concepts from other works and various other career inspirations from McQuarrie's past.
Character design is often a collaborative work and before the final result of R2-D2 was settled upon, there was certainly many rounds of conversations with Lucas and McQuarrie, followed by the prop and costume department working with Lucas input and McQuarrie's final sketches of R2-D2 to come up with a final result.
Each contributor likely left their mark from their own inspirations.
Who knows, George could have off-the-cuff thrown out to Ralph that he wanted a "simple robot, it needs to have an arm, or arms, similar to the little droids in Silent Running ..." to which McQuarrie could have then sat at his sketchpad, started to think, looked over at his vacuum cleaner, decided to take the thoughts from George and then shape those influences into a pseudo-aeronautical shaped robot, slightly inspired from McQuarries very own past.
It's impossible to know the original thought process but this isn't entirely implausible.
Unfortunately, the retelling of these details isn't always perfect and is sometimes contradictory because none of us ever remember all of the small details of our work from 10-30 years earlier.
Our minds tend to fill in the "gaps" of our recollection so one thing that George says might not align with Ralph and,
even still, there will always be little details that will be left out with time because people just don't remember.
The best answer that we can likely discern is to observe the history of the those involved in the development of Artoo and apply it to the details we have from interviews they've given over the years and settle for something, somewhere likely in the middle.
scifi.stackexchange.com/users/5493/RLH
I have always suspected a Rainbow D2 vacuum cleaner was the inspiration for the design as well as for the name.
The D2 was a 1960's version of the Rainbow vacuum.
scifi.stackexchange.com/users/58890/Charles Coffey
He appears to be based off a common park trash bin.
It's spot-on.
scifi.stackexchange.com/users/76281/Allaiyah Weyn
I actually once heard that the inspiration was a Danish brand of Hoover/Vacuum Cleaner from the company Nilsen & Fisker called Nilfisk.
You can see the resemblance with the 3 wheels and the shape quite clearly when you look at the original Nilfisk.
It is still sold today with very few modifications to it's design, and is considered a Danish design classic.
scifi.stackexchange.com/users/65979/Beninu Andersen
I am a Rainbow Sales Rep and in the list of famous people who owns Rainbows, George Lucas is one of them and he owned one (not sure if he still does) back in the 1970's when he was writing Star Wars and designing the characters.
So... we like to think he designed it after the D2 Series (Chrome Dome) Rainbow, but I'm sure he will deny it.
scifi.stackexchange.com/users/69588/Boyd Merriman
Looking at R2-D2, I can't think of any robots I've seen in science fiction that vaguely resemble R2D2's design.   What was the inspiration for the design of R2-D2?
What was the inspiration for the design of R2-D2?
scifi.stackexchange.com
<star-wars><r2-d2>
scifi.stackexchange.com/questions/99497
scifi.stackexchange.com/users/22917/Often Right
It's difficult to know for sure how R2-D2 was developed, however, George Lucas apparently admitted that inspiration was taken from Huey, Dewey and Louie from the film "Silent Running". That being said, there are numerous theories, such as taking inspiration from the Rainbow D2 vacuum cleaner or a park rubbish bin. In any case, character design is often a collaborative effort and, since the character in question was developed such a long time ago, it will be difficult to ascertain the true facts. There are a number of theories about the inspiration behind R2D2, including characters from the Silent Running and various vacuum cleaners or possibly the trash can
R2D2 was inspired by a trio of characters called Huey, Louie and Dewey from the film Silent Running. R2D2 was dreamed up by designer Ralph McQuarrie and went through various design modifications, possibly influenced by the D2 vacuum cleaner produced by the Rainbow company. R2D2 is based on the trash can. R2D2 is said to be based on a Nilfisk vacuum cleaner.