Skip to content

Commit 41187d6

Browse files
authored
fix "ModuleNotFoundError: No module named 'utils'" (#1188)
1 parent 1308e76 commit 41187d6

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

PathTracking/lqr_speed_steer_control/lqr_speed_steer_control.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
import numpy as np
1212
import scipy.linalg as la
1313
import pathlib
14-
from utils.angle import angle_mod
15-
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
1614

15+
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
16+
from utils.angle import angle_mod
1717
from PathPlanning.CubicSpline import cubic_spline_planner
1818

1919
# === Parameters =====

PathTracking/lqr_steer_control/lqr_steer_control.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
import numpy as np
1212
import sys
1313
import pathlib
14-
from utils.angle import angle_mod
15-
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
1614

15+
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
16+
from utils.angle import angle_mod
1717
from PathPlanning.CubicSpline import cubic_spline_planner
1818

1919
Kp = 1.0 # speed proportional gain

PathTracking/rear_wheel_feedback/rear_wheel_feedback.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
import matplotlib.pyplot as plt
99
import math
1010
import numpy as np
11-
from utils.angle import angle_mod
12-
11+
import sys
12+
import pathlib
1313
from scipy import interpolate
1414
from scipy import optimize
1515

16+
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
17+
from utils.angle import angle_mod
18+
1619
Kp = 1.0 # speed proportional gain
1720
# steering control parameter
1821
KTH = 1.0

PathTracking/stanley_controller/stanley_controller.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import matplotlib.pyplot as plt
1414
import sys
1515
import pathlib
16-
from utils.angle import angle_mod
17-
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
1816

17+
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
18+
from utils.angle import angle_mod
1919
from PathPlanning.CubicSpline import cubic_spline_planner
2020

2121
k = 0.5 # control gain

0 commit comments

Comments
 (0)