I read a lot of science fiction of random quality and length[1], and there's enough of a scattershot of ideas that an expansive humanity and humans dying off are not entirely uncommon ideas, so I've had reason to think about it fairly often. While I understand a lot of people might be upset at the idea humanity dying off, being a father myself and the understanding that while I can't stick around to experience everything myself, part of what I am (in the *intellectual sense more importantly than the biological one) continues on in part through my children (one of which is not biological, but just as much a continuation in the same sense).
That we might engineer our own obsolescence is scary, but so is the knowledge that we all die. Similar to in our individual lives, I find some comfort that in my old age I might be taken care of by my legacy.
Also, using humans for batteries is stupid. There's plenty of better reasons possible and that have been put forth for that plot point. That's just low hanging fruit for nerds. ;)
1: https://www.reddit.com/r/HFY/ - If you don't know what this is and you like science fiction, you're in for a treat. Check the sidebar for quality classics.
The [Machine War][1] describes how it was in the early days. The conflict started when a robot killed its human masters because they were planning to destroy it and replace by a newer model. That started a Machine Civil Rights Movements, but humanity had become lazy and arrogant due to the new lifestyle yielded by the creation of AI. Most humans refused to acknowledge the robots and the few human sympathizers who did were silenced. It's a great read/watch (if you see the anime), but I better stop here so I don't spoil anything.
After reading this, that has become my single concern about the future with AI: will humanity be able to treat and respect the machines as equals?
PS: I was reading about it just this past weekend. Such a coincidence. This thread was from where I got most of it: https://www.reddit.com/r/movies/comments/4h9ghg/in_the_matri...
I hope my comment didn't look like I was calling you out about these ideas. I was just excited at this coincidence and wanted to share it. They went completely unnoticed to me from watching just the movies. Makes them even better (including the sequels :P).
Amazing bit of irony if that's the case!