Skip to content

Commit e0ed97d

Browse files
committed
removed speed profile module import
1 parent 5d021f7 commit e0ed97d

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/components/control/pure_pursuit/pure_pursuit_controller.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,8 @@
44
Author: Shisato Yano
55
"""
66

7-
#import path setting
8-
import sys
9-
from pathlib import Path
107
from math import sin, tan, atan2
118

12-
abs_dir_path = str(Path(__file__).absolute().parent)
13-
relative_path = "/../../../components/"
14-
15-
sys.path.append(abs_dir_path + relative_path + "control/speed_profile")
16-
17-
#import component modules
18-
from trapezoidal_speed_profile import TrapezoidalSpeedProfile
19-
209

2110
class PurePursuitController:
2211
"""
@@ -35,7 +24,6 @@ def __init__(self, spec, course=None, color='g'):
3524
self.LOOK_FORWARD_GAIN = 0.3
3625
self.SPEED_PROPORTIONAL_GAIN = 1.0
3726
self.WHEEL_BASE_M = spec.wheel_base_m
38-
self.MAX_ACCEL_MPS2 = spec.max_accel_mps2
3927
self.DRAW_COLOR = color
4028

4129
self.course = course
@@ -45,15 +33,6 @@ def __init__(self, spec, course=None, color='g'):
4533
self.target_speed_mps = 0.0
4634
self.target_steer_rad = 0.0
4735
self.target_yaw_rate_rps = 0.0
48-
49-
if self.course:
50-
max_spd_mps = self.course.max_speed_mps()
51-
distance_m = self.course.distance_m()
52-
else:
53-
max_spd_mps = 1e-100
54-
distance_m = 1e-100
55-
56-
self.spd_prf = TrapezoidalSpeedProfile(max_spd_mps, self.MAX_ACCEL_MPS2, distance_m)
5736

5837
def _calculate_look_ahead_distance(self, state):
5938
"""

0 commit comments

Comments
 (0)