Skip to content

Commit b51d5d0

Browse files
committed
Fix negative progress by clipping (#61)
1 parent f1f03b1 commit b51d5d0

File tree

1 file changed

+1
-1
lines changed
  • tuplan_garage/planning/simulation/planner/pdm_planner/scoring

1 file changed

+1
-1
lines changed

tuplan_garage/planning/simulation/planner/pdm_planner/scoring/pdm_scorer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def _calculate_progress(self) -> None:
506506
progress = self._centerline.project([start_point, end_point])
507507
progress_in_meter[proposal_idx] = progress[1] - progress[0]
508508

509-
self._progress_raw = progress_in_meter
509+
self._progress_raw = np.clip(progress_in_meter, a_min=0, a_max=None)
510510

511511
def _calculate_is_comfortable(self) -> None:
512512
"""

0 commit comments

Comments
 (0)