Battle droids are fictional, robotic combat units in the Star Wars franchise. Though developed earlier, battle droids served the Droid Army as frontline units in the Trade Federation Army and for the Confederacy of Independent Systems during the Clone Wars era. They were mass-produced on Confederate planets such as Geonosis, and some units survived into the Galactic Civil War and Legacy era. Battle droids were originally made by Trade Federation Viceroy, Nute Gunray, to prevent pirate attacks. When he was contacted by Darth Sidious, he attacked the peaceful planet of Naboo. The droids easily overwhelmed Naboo's military forces and occupied the planet.
Battle droids are used as an easily controlled alternative to human soldiers. The tall, thin B1 model resembles the Geonosian race, who designed the droids, and are known to "suffer programming glitches that manifest as personality quirks". They are designed to win through overwhelming numbers, even though a small group of battle droids can be destroyed by a Jedi Knight, enough droids can take down many Jedi, as seen in the Geonosian arena battle in Attack of the Clones.
Battle droids were originally portrayed as being controlled by a large central computer, usually located on a heavily defended starship; If the central computer is destroyed, all battle droids under its control would cease to function. This occurred during the Battle of Naboo in The Phantom Menace, when Anakin Skywalker destroyed the Droid Control Ship. The monumental defeat spurred interest in independent droids, and this technique was put into action following the defeat. To combat this, the Trade Federation programmed a short list of commands for the droid to complete if their command system is destroyed.