Mixed-integer linear programming (MILP) for trajectory generation of mobile robot suffers from nonlinear constraints due to complex obstacle contours and dynamic environment. In this paper, firstly, we introduce a relative velocity coordinates MILP (RVCs-MILP) for solving the nonlinear constraints problem in the trajectory generation of the target pursuit and multiple-obstacle avoidance (TPMOA). The computational load of the RVCs-MILP does not increase with the complexity of obstacle contour but only relates to the number of the obstacles. It can be applied in real time when the number of the obstacles is small. For the large numbers of obstacles avoidance, further, we propose an IHDR based online learning mechanism. It sets up a "scenario-action mapping" knowledge base by continuously offline training and online updating. For a trajectory generation task, it will search a best match path of the current state in the knowledge base according to the external environments and the state of the robot in real time. Simulations are presented in comparison with the evolution algorithms (EA) and IHDR The former shows significant improvement in a number of aspects. The latter confirms the validation of the proposed IHDR methods.