Not necessarily. There are indeed some scientists who support the "Matrix theory", namely that the world we live in is just an illusion, created by some advanced AI, and that we all are wired to a central network. We would never be aware of that because the simulation is so perfect that we'll never have an idea of what the "real" reality would be like (because we have never experienced it before). The real reality would be so strange to us that we immediately would believe it to be an illusion / a fake. We would deny it to be true because we are so accustomed to the computer program and would always turn to what we think is true rather what IS true.
BTW, no matter how you take it, the "battery idea" can only be supported if the machines have found a way to create life out of nothing, so-to-speak. If you look closely at it, it is undeniably a fascinating idea, however, due to the fact that the world was devastated eons ago I highly suspect that there is enough raw material left on Earth to produce all the humans to use as a power source. You'll need nutritions to feed the humans; just by feeding them with liquified dead bodies could not be so efficient though because you would never be able to use everything from it. There would always be a non-digestable output. As a result of that the human population would become smaller and smaller, thus the energy they would supply would get scarcer and scarcer over time.