In this paper, an adaptive numerical computation approach is proposed for solving the nonlinear constrained optimal control problems, which includes terminal state constraints, state and control inequality constraints. At first, the sigmoid function is adopted to aggregate all constraints into terminal conditions. To increase the subsequent approximation accuracy, the problem is transformed into a multistage problem by control vector parameterization (CVP), in which a normalized time variable is introduced to convert the original problem into a fixed final time optimal control problem. Then the problem is discretized to a nonlinear programming by using triangular orthogonal functions (TOFs) method, whose numerical solutions can be obtained by sequential quadratic programming (SQP) method through solving the KKT optimality condition. Additionally, an adaptive strategy is applied to improve the procedure, in which the number of subinterval division and the order of TOFs approximation are adjusted according to errors. Finally, an optimal trajectory planning problem for mobile robot is solved by the proposed method. Simulation results show the feasibility and effectiveness of the proposed method.