In "Biblical Perspective" Gordon Snider writes:

While verses 29 and 30 form the biblical basis for the Calvinistic doctrine of predestination, we must remember that Paul introduced these thoughts to encourage the believer facing suffering. Paul's emphasis was that God was the initiator in our salvation, even before we were born. His purpose in salvation was to conform us to the image of his Son. For Jesus, the way to glory was through suffering, and so it will be with us.

Source: Studies in Romans: Adult Teacher's Insights, page 47.