Localization And Constrained Non-Linear Optimal Control In Autonomous Systems