Using CppAD and bicycle vehicle kinematic model for trajectory optimization and obstacle avoidance
GIF: Case 1: Reach Target Pose, without obstacles

GIF: Case 2: Reach Target Pose, with obstacles

GIF: Case 3: Reach Target Pose, with obstacles

Cost function for obstacle distance
x is the distance between a state pose and an obstacle; y is the cost.