{"id":13601286,"url":"https://github.com/DongChen06/PathTrackingBicycle","last_synced_at":"2025-04-11T04:30:28.808Z","repository":{"id":40605941,"uuid":"261766950","full_name":"DongChen06/PathTrackingBicycle","owner":"DongChen06","description":"Path tracking with dynamic bicycle models","archived":false,"fork":false,"pushed_at":"2020-06-09T14:28:21.000Z","size":758,"stargazers_count":88,"open_issues_count":1,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-02T18:40:13.526Z","etag":null,"topics":["bicycle-model","path-tracking","pid","stanley-controller"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DongChen06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-06T13:28:22.000Z","updated_at":"2024-07-02T07:57:50.000Z","dependencies_parsed_at":"2022-08-24T22:50:17.156Z","dependency_job_id":null,"html_url":"https://github.com/DongChen06/PathTrackingBicycle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongChen06%2FPathTrackingBicycle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongChen06%2FPathTrackingBicycle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongChen06%2FPathTrackingBicycle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongChen06%2FPathTrackingBicycle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DongChen06","download_url":"https://codeload.github.com/DongChen06/PathTrackingBicycle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458213,"owners_count":17148433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bicycle-model","path-tracking","pid","stanley-controller"],"created_at":"2024-08-01T18:00:59.884Z","updated_at":"2024-11-07T04:30:35.132Z","avatar_url":"https://github.com/DongChen06.png","language":"Python","funding_links":[],"categories":["Robotics"],"sub_categories":[],"readme":"# PathTrackingBicycle\nImplementation of path tracking with a linear/non-linear bicycle model. We use the PID and standley controllers to control the longitudinal and lateral movements, respectively. We use the key idea of ref.[1], while replacing the vehicle dynamics in Carla simulator with linear/non-linear bicycle models. \n\n## Bicycle Models\n\nWe use the kinematic and dynamic bicycle models as mentioned in ref.6.\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"docs/carmodel.png\" alt=\"output_example\" width=\"30%\" height=\"20%\"\u003e\n     \u003cbr\u003e Fig.1 Kinematic Bicycle Model\n\u003c/p\u003e\n\n\n- Linear Bicycle Model. \n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"docs/linearmodel.png\" alt=\"output_example\" width=\"30%\" height=\"20%\"\u003e\n     \u003cbr\u003e\n\u003c/p\u003e\n\n\n- Non-linear bicycle model.\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"docs/nonlinearmodel.png\" alt=\"output_example\" width=\"30%\" height=\"20%\"\u003e\n     \u003cbr\u003e\n\u003c/p\u003e\n\nThe control inputs are [throttle, steering]. \n\n## Controllers\n\n- PID controller.\n\nGiven the current speed v(t) we minimize the error term e = v_desired − v_current using a PID controller for the throttle value. The range for the throttle values is [-1, 1]. The formula is\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"docs/pid.png\" alt=\"output_example\" width=\"30%\" height=\"20%\"\u003e\n     \u003cbr\u003e\n\u003c/p\u003e\n\nWhere KP, KI and KD are proportional, integral and derivative parameters, respectively.\n\n\n- Stanley Controller.\n\nFor lateral control, we adapt the standley control(To learn more about the Stanley Control, check out ref.5). There are two error metrics: the distance to centerline d(t) and the relative angle ψ(t). The control law to calculate the\nsteering angle δ_{SC}(t) at the current vehicle speed v(t) is given by \n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"docs/sc.png\" alt=\"output_example\" width=\"30%\" height=\"20%\"\u003e\n     \u003cbr\u003e\n\u003c/p\u003e\n\nwhere k is a gain parameter.\n\n\n## Experiments\n\n\nWe test vehicle models with PID and standley controllers. \n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"results/speed_linear.png\" alt=\"output_example\" width=\"60%\" height=\"60%\"\u003e\n     \u003cbr\u003eFig.2 Speed tracking of linear vehicle model\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"results/trajectory_linear.png\" alt=\"output_example\" width=\"60%\" height=\"60%\"\u003e\n     \u003cbr\u003eFig.3 Path tracking of linear vehicle model\n\u003c/p\u003e\n\nThe testing results on non-linear bicycle models.\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"results/speed_non_linear.png\" alt=\"output_example\" width=\"60%\" height=\"60%\"\u003e\n     \u003cbr\u003eFig.4 Speed tracking of non-linear vehicle model\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"results/trajectory_non_linear.png\" alt=\"output_example\" width=\"60%\" height=\"60%\"\u003e\n     \u003cbr\u003eFig.5 Path tracking of non-linear vehicle model\n\u003c/p\u003e\n\n\n*Here we enlarge the throttle by 5 times for better visualization.*\n\n\n## ToDO Lists:\n\n- [ ] For better tracking accuracy, we use the linearly interpolation between waypoints. While We can also use better methods like spline interpolation, for example. [see ref.2]\n- [ ] To better improvement, we can use seperate longitudinal and lateral bicycle model. In our non-linear bicycle model, we simply consider Fx as the driving force, while this is not how it is done in a real vehicle (engine -\u003e torque converter -\u003e transmission -\u003e wheel). For better performance, please go to ref.3 and ref.4. \n- [ ] Refine the performance.\n- [ ] For better tracking performance, we can also try control methods, like MPC. [see ref.7]\n\n\n\n## Reference:\n\n1. [Self Driving Cars Longitudinal and Lateral Control Design](https://github.com/enginBozkurt/SelfDrivingCarsControlDesign)\n\n2. [Path tracking simulation with Stanley steering control and PID speed control.](https://github.com/AtsushiSakai/PythonRobotics/blob/master/PathTracking/stanley_controller/stanley_controller.py)\n\n3. [Model predictive control for autonomous driving of a truck](http://www.diva-portal.org/smash/record.jsf?pid=diva2%3A930995\u0026dswid=9938)\n\n4. [Longitudinal Vehicle Model Implementation](https://github.com/daniel-s-ingram/self_driving_cars_specialization/blob/master/1_introduction_to_self_driving_cars/Longitudinal_Vehicle_Model.ipynb)\n\n5. [Snider, J. M., \"Automatic Steering Methods for Autonomous Automobile Path Tracking\", Robotics Institute, Carnegie Mellon University, Pittsburg (February 2009).]( https://www.ri.cmu.edu/pub_files/2009/2/Automatic_Steering_Methods_for_Autonomous_Automobile_Path_Tracking.pdf)\n\n6. [Kong, Jason, et al. \"Kinematic and dynamic vehicle models for autonomous driving control design.\" 2015 IEEE Intelligent Vehicles Symposium (IV). IEEE, 2015.] (https://borrelli.me.berkeley.edu/pdfpub/IV_KinematicMPC_jason.pdf)\n\n7. [model_predictive_speed_and_steer_control](https://github.com/AtsushiSakai/PythonRobotics/tree/master/PathTracking/model_predictive_speed_and_steer_control)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDongChen06%2FPathTrackingBicycle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDongChen06%2FPathTrackingBicycle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDongChen06%2FPathTrackingBicycle/lists"}