This movie was about a robot that looks like he is a burlap doll.
He fights against a nightmarish spherical robot near the end.
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
This is '9' from 2009.
In an alternate 1930's world, an unnamed scientist (Alan Oppenheimer) is ordered by his dictator (Tom Kane) to create a robot in the apparent name of progress. Following these orders, the scientist creates the B.R.A.I.N., a robot with high intelligence the scientist literally created from his own intellect, allowing it to be able to create other robots and machines. Upon its completion, however, the dictator quickly seizes the machine from the scientist before he can give it any human characteristics, such as a soul, and makes it into the Fabrication Machine, an armature that can construct an army of war machines that will destroy the dictator's enemies. Lacking a soul, however, the Fabrication Machine decides to exterminate all of Earth's population, and it programs the created army of war machines to attack humanity, wiping out all plant, animal and microbial life with waves of toxic gas and chemical weapons. With the entire planet's life on the verge of destruction, the scientist uses alchemy to create nine homunculus-like rag dolls known as "stitchpunks", giving them portions of his own soul, via a talisman that he created, to bring them to life. He dies upon completion of the final doll.
You can see the ending here complete with monstrous spherical robot monster.