Skip to content

Commit

Permalink
修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
teamo1996 committed May 25, 2021
1 parent db50799 commit bf22c5b
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 16 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified Project/.DS_Store
Binary file not shown.
Binary file modified 第八章:模型预测控制在运动规划的应用/.DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
for i = 1:20
tref = t + i*0.2;
r=0.25*tref;
pt(i,1) = r*sin(0.2*tref);
vt(i,1) = r*cos(0.2*tref);
at(i,1) = -r*sin(0.2*tref);
w = 0.7;
pt(i,1) = r*sin(w*tref);
vt(i,1) = r*cos(w*tref);
at(i,1) = -r*sin(w*tref);

pt(i,2) = r*cos(0.2*tref);
vt(i,2) = -r*sin(0.2*tref);
at(i,2) = -r*cos(0.2*tref);
pt(i,2) = r*cos(w*tref);
vt(i,2) = -r*sin(w*tref);
at(i,2) = -r*cos(w*tref);

pt(i,3) = 20 - 0.5*tref;
vt(i,3) = -0.5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
P(i,1) = P(i,1) + P(i,3);
P(i,4) = w * P(i,4)+ 0.2*(rand) * (P(i,6) - P(i,2)) + 0.2*(rand) * (global_best(2) - P(i,2));
P(i,2) = P(i,2) + P(i,4);
P(i,1:2) = limitRange(P(i,1:2));
end
%evaluate the particles
cost = evaluate(R,omega,p0,P(i,1),last_theta-theta,v_ini,P(i,2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
a_list=[]; % 输入列表

%% 开始仿真
for n=1:450
for n=1:700
% 使用PSO算法选择最佳的线速度和角速度
global_best = pso_select(theta,omega,v_c,[x y]',theta_target,v_target);
theta_target = global_best(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<!--
* @Author: your name
* @Date: 2021-05-08 21:18:42
* @LastEditTime: 2021-05-08 22:41:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /Motion-plan/第八章:模型预测控制在运动规划的应用/README.md
-->
# 第八章作业

本次的作业主要是利用模型预测控制(MPC)来完成路径规划
Expand All @@ -26,5 +18,5 @@

![](pictures/4.png)

![](pictures/6.png)
![](pictures/5.png)

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bf22c5b

Please sign in to comment.