Skip to content

Commit 197dafa

Browse files
committed
Use Euclidean distance as init_p_len and make a new video.
1 parent 373e332 commit 197dafa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PathPlanning/ModelPredictiveTrajectoryGenerator/model_predictive_trajectory_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
h = np.matrix([0.5, 0.02, 0.02]).T # parameter sampling distance
3131
cost_th = 0.1
3232

33-
matplotrecorder.DO_NOTHING = False
33+
matplotrecorder.DO_NOTHING = True
3434
show_graph = True
3535

3636
def limitP(p, cfg):
@@ -177,7 +177,7 @@ def test_optimize_trajectory():
177177
k0 = 0.0
178178

179179
init_p_len = math.sqrt(target.x**2 + target.y**2)
180-
init_p = np.matrix([1.0, 0.0, 0.0]).T
180+
init_p = np.matrix([init_p_len, 0.0, 0.0]).T
181181
init_p = limitP(init_p, mcfg)
182182

183183
x, y, yaw, p = optimize_trajectory(target, k0, init_p)
Binary file not shown.

0 commit comments

Comments
 (0)