{"id":19526612,"url":"https://github.com/zju-fast-lab/mpc-car-tutorial","last_synced_at":"2025-06-21T17:02:52.431Z","repository":{"id":245980395,"uuid":"491383162","full_name":"ZJU-FAST-Lab/mpc-car-tutorial","owner":"ZJU-FAST-Lab","description":"A tutorial of using MPC (both implementations of nonlinear MPC and linear time-varying MPC) for reference tracking with a bicycle model.","archived":false,"fork":false,"pushed_at":"2023-04-21T02:55:58.000Z","size":215,"stargazers_count":32,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T17:02:05.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJU-FAST-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T05:57:56.000Z","updated_at":"2025-06-21T10:38:35.000Z","dependencies_parsed_at":"2024-06-25T06:49:33.423Z","dependency_job_id":"4a4f8079-e488-4a6f-9da7-d700cb6116e0","html_url":"https://github.com/ZJU-FAST-Lab/mpc-car-tutorial","commit_stats":null,"previous_names":["zju-fast-lab/mpc-car-tutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZJU-FAST-Lab/mpc-car-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fmpc-car-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fmpc-car-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fmpc-car-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fmpc-car-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJU-FAST-Lab","download_url":"https://codeload.github.com/ZJU-FAST-Lab/mpc-car-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fmpc-car-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261162061,"owners_count":23118219,"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":[],"created_at":"2024-11-11T01:10:54.697Z","updated_at":"2025-06-21T17:02:47.416Z","avatar_url":"https://github.com/ZJU-FAST-Lab.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to Run\n```\n./install_tools.sh\ncatkin_make -j1\nsource devel/setup.zsh\nroslaunch mpc_car simulation.launch\n```\n## How to Tune Parameters\n```\n./src/mpc_car/config/mpc_car.yaml -\u003e mpc parameters\n./src/car_simulator/config/car_simulator.yaml -\u003e initial states (in simulation)\n```\n\n## Object and Constraints\n\u003e Implement MPC of tracking the reference trajectory in C++;\n```\nmin  J = \\sum_{i=0}^N (x-x_r)^2+ (y-y_r)^2 + rho * (phi-phi_r)^2\n\ns.t. -0.1 \u003c= v_k \u003c= v_max\n     |a_k| \u003c= a_max\n     |delta_k| \u003c= delta_max\n     |delta_{k+1} - delta_k| \u003c= ddelta_max * dt\n```\n\n## NMPC or QP\n\n```\n./src/car_simulator/src/car_simulator_nodelet.cpp\n```\n\u003eret = mpcPtr_-\u003esolveNMPC(state_);\n\n\u003eret = mpcPtr_-\u003esolveQP(state_);\n\nQP is solved by OSQP and NMPC is solved by lbfgs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Fmpc-car-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzju-fast-lab%2Fmpc-car-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Fmpc-car-tutorial/lists"}