When you can accumulate static electricity from water pipes and kinetic energy from blades of grass moving and thermal energy from the difference in temperature between a swimming pool and the hot concrete around it energy is everywhere.Let me start by saying that whenever someone tells today's version of the Wright Brothers "it'll never fly", it's easy to find stupid things to say about them. I get that. There's also a saying by Arthur C. Clarke, "If an elderly but distinguished scientist says that something is possible, he is almost certainly right; but if he says that it is impossible, he is very probably wrong." I may be hitting elderly but I'm certainly not distinguished, and I'm reluctant to say it's impossible. It just isn't going to happen in our lifetimes and probably not in this century.
We are making massive improvements in capacitors and batteries.
Let's take some current military projects as examples. There are wearable garments and boots that are designed to generate electricity from the movement of a given soldier to charge suit electronics and recharge batteries.
Take that and apply it to the idea that you can program nannites to form electrical conductors along tree branches and then form whatever type of electrical generator you would like at the base of the stem of each leaf on each tree in a forest. When the wind blows you could generate a moderate amount of electricity from each tree. You could accumulate all of the electricity from a tree in a capacitor at the base. Then you could have the nannites form conductors from each capacitor to a larger capacitor near where the electrical energy is to be used. As far as powering each individual nannite, you could use inductive charging with really small and really efficient batteries on each nannite and for every 20 nannites have a handful that collect static electricity or solar energy or thermal energy based on the environment and time of day and season. The energy collectors would have inductive chargers that would be used to charge the worker bee nannites.
And I truly believe that the people who worked in industries supporting the first computers would never have dreamed that you could pick one up and carry it in a pocket and run it for eight or more hours off of a battery the size of a deck of cards.
And I truly believe that the people who worked in industries supporting the space industries in the fifties and sixties would never have believed that commercial space launches would become viable without an entire nation's resources to back the process.
And I truly believe that the people watching the Wright brothers at Kitty Hawk would never have envisioned a Boeing 787 or an SR-71 Blackbird.
The comment that the people at Kitty Hawk would never have envisioned the 787 is particularly apt because there was about 100 years between them. The kind of things you're imagining seem to be 100 years away from the first tentative steps we're making now. The robots you posted about on Og's page are light years from where we need to be. "Scientists want to build mechanical nanobots on the bacteria model."? Bacteria are several orders of magnitude bigger than what you want. Assuming we just get from these crude first robots to universal assemblers reminds me of the famous Sidney Harris cartoon where a scientist is doing a derivation of equations on a blackboard, stops, adds, "then a miracle occurs", and resumes. There are too many steps missing in there.
I see tons of questions there that can't just be waved off in my mind. First off, we're not making massive improvements in batteries. The uniforms that harvest mechanical energy as electrical are trivial compared to what's needed here. Energy harvesting is big business and going to get bigger as an entirely macroscopic phenomenon. There is no Moore's Law of batteries, improving capacity is rough work with slow progress. As a species, we know next to nothing about how to make machines that work on that scale, and the evidence is that simply scaling them doesn't work very well. How do you program something so small it can recognize and move individual atoms? How much memory can it have? It can't have much, since even quantum devices will be the same scale as what you're working on. How big does the manipulator have to be to do everything it has to do: be powered, have memory, have manipulators of some kind, mobility of some kind. In the whimsical cartoon I posted, the manipulator was microscopic and the things it was manipulating appeared to be pollen grains. Both of them many orders of magnitude bigger than what we're talking about.
I'm not even addressing any of the things Og addressed, about how when we make an alloy, it's not just the atoms you use but how you treat the result, whether by cold working or heat stressing. There are so many problems to solve to get where you want. Will these problems be solved? Some for sure. Maybe all of them, but maybe not. Undoubtedly, new problems will show up and some of them will be even more intractable. I seriously doubt we'll see universal assemblers in either of our lifetimes, unless you figure to live past 2100.