fix: external radius
This commit is contained in:
10
autopilot.py
10
autopilot.py
@@ -105,7 +105,7 @@ class AutoPilot(Pilot):
|
||||
self.points = points
|
||||
self.target_idx = 0
|
||||
self.target_reached_threshold = 5
|
||||
self.direct_step_threshold = 35
|
||||
self.direct_step_threshold = 15
|
||||
|
||||
self.timer = Timer()
|
||||
self.chunk_points = np.array([[chunk.pos.x, chunk.pos.y] for chunk in self.chunks])
|
||||
@@ -410,7 +410,13 @@ class AutoPilot(Pilot):
|
||||
angle_diff -= 2 * math.pi
|
||||
|
||||
if distance_to_target < self.direct_step_threshold:
|
||||
return PilotCommand(angle_diff, distance_to_target, False, self.timer.get_elapsed())
|
||||
d_a_limit = np.radians(5)
|
||||
return PilotCommand(
|
||||
max(min(d_a_limit, angle_diff), -d_a_limit),
|
||||
distance_to_target,
|
||||
False,
|
||||
self.timer.get_elapsed()
|
||||
)
|
||||
|
||||
# Проверка на слепую зону
|
||||
R = 120
|
||||
|
||||
Reference in New Issue
Block a user