Energy-aware Model Predictive Control with Obstacle Avoidance