Skip to content

Commit 8061e73

Browse files
committed
fix LQR rrt star
1 parent 0937486 commit 8061e73

File tree

4 files changed

+138
-220
lines changed

4 files changed

+138
-220
lines changed

PathPlanning/LQRPlanner/LQRplanner.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
66
77
"""
88

9+
import math
10+
import random
11+
912
import matplotlib.pyplot as plt
1013
import numpy as np
1114
import scipy.linalg as la
12-
import math
13-
import random
1415

15-
show_animation = True
16+
SHOW_ANIMATION = True
1617

1718
MAX_TIME = 100.0 # Maximum simulation time
1819
DT = 0.1 # Time tick
1920

2021

21-
def LQRplanning(sx, sy, gx, gy):
22+
def LQRplanning(sx, sy, gx, gy, show_animation=SHOW_ANIMATION):
2223

2324
rx, ry = [sx], [sy]
2425

@@ -129,7 +130,7 @@ def main():
129130

130131
rx, ry = LQRplanning(sx, sy, gx, gy)
131132

132-
if show_animation: # pragma: no cover
133+
if SHOW_ANIMATION: # pragma: no cover
133134
plt.plot(sx, sy, "or")
134135
plt.plot(gx, gy, "ob")
135136
plt.plot(rx, ry, "-r")

0 commit comments

Comments
 (0)