Patent attributes
According to some embodiments, a system generates a number of possible decisions for routing the ADV from a first location to a second location based on perception information perceiving a driving environment surrounding the ADV, including one or more obstacles in view of a set of traffic rules. The system calculates a number of trajectories based on a combination of one or more of the possible decisions. The system calculates a total cost for each of the trajectories using a number of cost functions and selects one of the trajectories with a minimum total cost as the driving trajectory to control the ADV autonomously. The cost functions include a path cost function, a speed cost function, and an obstacle cost function.