Whatever you do don't fill the barrels with foam! Besides costing you a lot of money that is an environmental polluting disaster, simply releasing deadly chemicals into the air to propel this gunge into your natural wooden floats. Instead of that collect empty plastic bottles and screw their lids on. Put them in the barrels if you feel that the barrels would after some time begin to take in water. Those plastic bottles can be removed after five or six years should the barrels fall apart or you can use better polypropaline (industrial) plastic barrels which will last sixty years. They have sealable tops and when filled with plastic bottles will take the strain of even ice. You can drive a car over disposable bottles and they will not burst. If you buy new empty bottles they will split - all our industries like to produce crap for consumers but their nasty drinks full of chemicals to make kids' teeth fall out, are put in "disposable containers" which are made to withstand temperature differences of over 60˚and will withstand almost ANY force humans can create.
Your main challenge will be to get some sort of gearing which will turn your very very slow revs per minute, into hundreds of revs to get your generator going. Using long stretches of electrical cord may help if your revolving parts are big enough and the cord does not slip when the load is placed. You don't say how you fix your axis, if it is held top and bottom by ropes from another fixed point upstream or somehow fixed to the river bed.
Go for it! The great thing about making something movable like that is that when the cops or sherifs or whatever those unimaginative office workers are called in your precinct, arrive to complain that you are getting something for free (which is probably just not on, in the land which they used to call free), you can take it out and say "sorry boss, didn't want to ruin your day, I'll go elsewhere with my bright spark ideas, somewhere they NEED a man with ideas and the guts to try them out" so you won't be put in prison for upsetting the power company's monopoly.
Best of luck and how about some photos?