Constrained Optimal Planning to Minimize Battery Degradation of Autonomous Mobile Robots