项目作者: gn02596703

项目描述 :
Python Implementation of Model Predictive Trajectory Generation for ground vehicles
高级语言: Python
项目地址: git://github.com/gn02596703/pyTrajectoryGenerator.git
创建时间: 2020-06-02T08:14:33Z
项目社区:https://github.com/gn02596703/pyTrajectoryGenerator

开源协议:MIT License

下载


Introduction

This is the python implementation of a model predictive path generation method. Only numpy is used in the implementaion. It can be easily incorporated to other application.

QuickStart

  1. from Polyminal_TrajectoryGenerator_OneShotMethod import TrajectoryGenerator
  2. PathGenerator = TrajectoryGenerator()
  3. ## coordinate
  4. # Y
  5. # ^ /
  6. # | /
  7. # | / <theta>
  8. # o -- -- -- >X
  9. x_0 = 0.0 # initial x position
  10. y_0 = 0.0 # initial y position
  11. theta_0 = 30.0 *np.pi/180 # initial heading angle of the vehicle
  12. kappa_0 = 30.0 *np.pi/180 # initial steering angle
  13. initial_state = [x_0, y_0, theta_0, kappa_0]
  14. x_f = 8.0 # final x position
  15. y_f = 13.0 # final y position
  16. theta_f = 90.0 *np.pi/180 # final heading angle of the vehicle
  17. kappa_f = 0.0 *np.pi/180 # final steering angle
  18. final_state = [x_f, y_f, theta_f, kappa_f]
  19. # compute trajectory in a list of point
  20. traject = PathGenerator.compute_spline(initial_state, final_state)

You can find a simple demo about how to use it in the file.