Skip to content

Commit 34d71ca

Browse files
committed
Increase radius for duplicate poles
1 parent d7b5d9c commit 34d71ca

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

task_queue/grid_optimizer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,11 @@ def _place_pole(label, x, y):
544544
raw_positions = self._sample_points_along_polyline(
545545
waypoints, self.distribution_cable_max_length
546546
)
547-
# 1 cm tolerance: drop positions that coincide with an endpoint
548-
# when path length is a precise multiple of max_length.
547+
# Drop positions that coincide with an endpoint (1m tolerance)
549548
road_positions = [
550549
(px, py) for px, py in raw_positions
551-
if math.sqrt((px - x_from) ** 2 + (py - y_from) ** 2) > 0.01
552-
and math.sqrt((px - x_to) ** 2 + (py - y_to) ** 2) > 0.01
550+
if math.sqrt((px - x_from) ** 2 + (py - y_from) ** 2) > 1
551+
and math.sqrt((px - x_to) ** 2 + (py - y_to) ** 2) > 1
553552
]
554553

555554
if road_positions:

0 commit comments

Comments
 (0)