Skip to content

Commit

Permalink
fix LQR rrt star
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiSakai committed Jul 27, 2019
1 parent 0937486 commit 8061e73
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 220 deletions.
11 changes: 6 additions & 5 deletions PathPlanning/LQRPlanner/LQRplanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
"""

import math
import random

import matplotlib.pyplot as plt
import numpy as np
import scipy.linalg as la
import math
import random

show_animation = True
SHOW_ANIMATION = True

MAX_TIME = 100.0 # Maximum simulation time
DT = 0.1 # Time tick


def LQRplanning(sx, sy, gx, gy):
def LQRplanning(sx, sy, gx, gy, show_animation=SHOW_ANIMATION):

rx, ry = [sx], [sy]

Expand Down Expand Up @@ -129,7 +130,7 @@ def main():

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

if show_animation: # pragma: no cover
if SHOW_ANIMATION: # pragma: no cover
plt.plot(sx, sy, "or")
plt.plot(gx, gy, "ob")
plt.plot(rx, ry, "-r")
Expand Down
Loading

0 comments on commit 8061e73

Please sign in to comment.