{"id":146,"date":"2024-11-19T14:29:51","date_gmt":"2024-11-19T06:29:51","guid":{"rendered":"http:\/\/116.205.168.68\/?p=146"},"modified":"2025-01-16T00:43:53","modified_gmt":"2025-01-15T16:43:53","slug":"acados","status":"publish","type":"post","link":"https:\/\/jamilblog.top\/?p=146","title":{"rendered":"\u3010Acados\u3011Ubuntu\u4e0bAcados\u5b89\u88c5\u6559\u7a0b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Acados\u4ecb\u7ecd<\/h2>\n\n\n\n<p>\u200c<strong><a href=\"https:\/\/www.baidu.com\/s?rsv_dl=re_dqa_generate&amp;sa=re_dqa_generate&amp;wd=Acados&amp;rsv_pq=8152e1ec00008055&amp;oq=%E4%BB%80%E4%B9%88%E4%BA%8Bacados&amp;rsv_t=d371v+QHWFkZ0kN5gFcS9sSnaiSCtVQEwFFW8ekA7X7JUW+ZIBFoJ4f1oek&amp;tn=baidu&amp;ie=utf-8\" target=\"_blank\" rel=\"nofollow noopener\">Acados<\/a><\/strong>\u200c\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u6c42\u89e3\u5668\u5e93\uff0c\u4e3b\u8981\u7528\u4e8e\u89e3\u51b3\u63a7\u5236\u7406\u8bba\u4e2d\u7684\u52a8\u6001\u4f18\u5316\u95ee\u9898\u3002\u5b83\u4ee5C++\u548cPython\u4e24\u79cd\u8bed\u8a00\u5b9e\u73b0\uff0c\u5e76\u901a\u8fc7CasADi\u3001Eigen\u7b49\u9ad8\u6548\u7684\u6570\u503c\u8ba1\u7b97\u5e93\u8fdb\u884c\u652f\u6301\u3002Acados\u7684\u6838\u5fc3\u662f\u5176\u5185\u5efa\u7684\u9ad8\u901f\u4f18\u5316\u5f15\u64ce\uff0c\u80fd\u591f\u5904\u7406\u975e\u7ebf\u6027\u52a8\u6001\u7cfb\u7edf\u7684\u6a21\u578b\u9884\u6d4b\u63a7\u5236\uff08MPC\uff09\u548c\u5176\u4ed6\u4f18\u5316\u4efb\u52a1\u200c\u3002\u7b80\u5355\u6765\u8bf4Acados\u901a\u8fc7python\u548cC++\u5bf9CasADi\u8fdb\u884c\u4e86\u5c01\u88c5\uff0c\u80fd\u591f\u8ba9\u6211\u4eec\u66f4\u7b80\u5355\u7684\u5b9e\u73b0\u6700\u4f18\u95ee\u9898\u7684\u6c42\u89e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b89\u88c5\u6559\u7a0b<\/h2>\n\n\n\n<p>Acados\u5b98\u65b9<a href=\"https:\/\/docs.acados.org\/index.html\" target=\"_blank\" rel=\"nofollow noopener\">Wiki<\/a>\u63d0\u4f9b\u4e86\u5b89\u88c5\u65b9\u6cd5\uff0c\u8fd9\u91cc\u6211\u4eec\u4ee5\u5b98\u65b9Wiki\u4e3a\u4e3b\u8fdb\u884c\u5c55\u5f00<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u62c9\u53d6Acados\u5b98\u65b9\u7684\u4ed3\u5e93<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"git clone https:\/\/github.com\/acados\/acados.git\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">git<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">clone<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">https:\/\/github.com\/acados\/acados.git<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u62c9\u53d6\u5b50\u6a21\u5757\u7684\u5185\u5bb9<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"cd acados\ngit submodule update --recursive --init\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #82AAFF\">cd<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">acados<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">git<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">submodule<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">update<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">--recursive<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">--init<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u7f16\u8bd1\u5de5\u7a0b<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"mkdir -p build\ncd build\ncmake -DACADOS_WITH_QPOASES=ON ..\n# add more optional arguments e.g. -DACADOS_WITH_OSQP=OFF\/ON -DACADOS_INSTALL_DIR=&lt;path_to_acados_installation_folder&gt; above\nmake install -j4\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">mkdir<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">-p<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">build<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">cd<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">build<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">cmake<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">-DACADOS_WITH_QPOASES=ON<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">..<\/span><\/span>\n<span class=\"line\"><span style=\"color: #546E7A; font-style: italic\"># add more optional arguments e.g. -DACADOS_WITH_OSQP=OFF\/ON -DACADOS_INSTALL_DIR=&lt;path_to_acados_installation_folder&gt; above<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">make<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">install<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">-j4<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u4e00\u822c\u6765\u8bf4\u6211\u4eec\u9700\u8981\u5728python\u4e2d\u7f16\u5199\u6a21\u578b\uff0c\u6240\u4ee5\u8fd8\u9700\u8981\u5728python\u73af\u5883\u4e2d\u5b89\u88c5acados\u63a5\u53e3<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"pip install -e &lt;acados_root&gt;\/interfaces\/acados_template\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">pip<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">install<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">-e<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #C3E88D\">acados_roo<\/span><span style=\"color: #EEFFFF\">t<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #C3E88D\">\/interfaces\/acados_template<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u8fd9\u91cc&lt;acados_root&gt;\u8981\u66ff\u6362\u6210acados\u4ed3\u5e93\u7684\u76ee\u5f55<\/p>\n\n\n\n<p>\u4e3a\u4e86\u8ba9python\u89e3\u91ca\u5668\u53ef\u4ee5\u627e\u5230\u521a\u521a\u7f16\u8bd1\u51fa\u6765\u7684\u5e93\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5c06acaods\u7684\u5e93\u5730\u5740\u52a0\u5165\u52a8\u6001\u94fe\u63a5\u5e93\u7684\u73af\u5883\u53d8\u91cf<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:&quot;&lt;acados_root&gt;\/lib&quot;\nexport ACADOS_SOURCE_DIR=&quot;&lt;acados_root&gt;&quot;\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #EEFFFF\"> LD_LIBRARY_PATH<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\">$LD_LIBRARY_PATH<\/span><span style=\"color: #C3E88D\">:<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">&lt;acados_root&gt;\/lib<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #EEFFFF\"> ACADOS_SOURCE_DIR<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">&lt;acados_root&gt;<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4e0a\u8ff0\u4e24\u884c\u4ee3\u7801\uff0c\u53ef\u4ee5\u4f7f\u8be5\u7ec8\u7aef\u6b63\u786e\u7684\u7d22\u5f15acados\u7684\u52a8\u6001\u5e93\uff0c\u4f46\u662f\u6bcf\u6b21\u65b0\u5f00\u4e00\u4e2a\u7ec8\u7aef\u90fd\u9700\u8981\u8f93\u5165\u5f88\u9ebb\u70e6\uff0c\u8fd9\u91cc\u5efa\u8bae\u5c06\u4e0a\u8ff0\u4e24\u884c\u4ee3\u7801\u52a0\u5165bashrc\u4e2d\uff0c\u8fd9\u6837\u5373\u53ef\u6bcf\u6b21\u6253\u5f00\u7ec8\u7aef\u65f6\u81ea\u52a8\u6dfb\u52a0\u8fd9\u4e24\u4e2a\u5730\u5740<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"vim ~\/.bashrc    #\u5982\u679c\u4f60\u4f7f\u7528zsh\u90a3\u5c31\u4f7f\u7528 vim ~\/.zshrc\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">vim<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">~\/.bashrc<\/span><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #546E7A; font-style: italic\">#\u5982\u679c\u4f60\u4f7f\u7528zsh\u90a3\u5c31\u4f7f\u7528 vim ~\/.zshrc<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u7136\u540e\u5728\u6587\u4ef6\u6700\u4f4e\u7aef\u8f93\u5165\u4e0a\u9762\u4e24\u884c\u4ee3\u7801\uff0c\u4e3a\u4e86\u4fdd\u8bc1bashrc\u7684\u53ef\u8bfb\u6027\u5efa\u8bae\u6dfb\u52a0\u6ce8\u91ca\u5982\u4e0b<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"# Acados\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:&quot;&lt;acados_root&gt;\/lib&quot;\nexport ACADOS_SOURCE_DIR=&quot;&lt;acados_root&gt;&quot;\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #546E7A; font-style: italic\"># Acados<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #EEFFFF\"> LD_LIBRARY_PATH<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\">$LD_LIBRARY_PATH<\/span><span style=\"color: #C3E88D\">:<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">&lt;acados_root&gt;\/lib<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #EEFFFF\"> ACADOS_SOURCE_DIR<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">&lt;acados_root&gt;<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u6d4b\u8bd5<\/h2>\n\n\n\n<p>\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7python\u8fd0\u884c\u6837\u4f8b\u811a\u672c\u6765\u68c0\u6d4b\u6211\u4eec\u7684\u5b89\u88c5\u662f\u5426\u6b63\u786e<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#263238\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"python &lt;acados_root&gt;\/examples\/acados_python\/getting_started\/minimal_example_ocp.py\" style=\"color:#EEFFFF;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">python<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #C3E88D\">acados_roo<\/span><span style=\"color: #EEFFFF\">t<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #C3E88D\">\/examples\/acados_python\/getting_started\/minimal_example_ocp.py<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u5982\u679c\u8fd0\u884c\u6210\u529f\u4f1a\u663e\u793a\u6c42\u89e3\u7684\u7ed3\u679c\uff0c\u5e76\u751f\u6210\u5bf9\u5e94\u7684C\u6587\u4ef6<\/p>\n\n\n\n<p>OCP DOC\uff1a<a href=\"https:\/\/github.com\/acados\/acados\/blob\/master\/docs\/problem_formulation\/problem_formulation_ocp_mex.pdf\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/acados\/acados\/blob\/master\/docs\/problem_formulation\/problem_formulation_ocp_mex.pdf<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Acados\u4ecb\u7ecd \u200cAcados\u200c\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u6c42\u89e3\u5668\u5e93\uff0c\u4e3b\u8981\u7528\u4e8e\u89e3\u51b3\u63a7\u5236\u7406\u8bba\u4e2d\u7684\u52a8\u6001\u4f18\u5316\u95ee\u9898\u3002\u5b83\u4ee5C++\u548cPython\u4e24\u79cd\u8bed\u8a00\u5b9e\u73b0 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-146","post","type-post","status-publish","format-standard","hentry","category-tools","category-solver"],"_links":{"self":[{"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/posts\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jamilblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=146"}],"version-history":[{"count":10,"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/jamilblog.top\/index.php?rest_route=\/wp\/v2\/posts\/146\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/jamilblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jamilblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jamilblog.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}