Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add null constraints check to precalcValues #955

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pathplannerlib-python/pathplannerlib/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,10 @@ def _precalcValues(self) -> None:
if self.numPoints() > 0:
for i in range(self.numPoints()):
point = self.getPoint(i)

if point.constraints is None:
point.constraints = self._globalConstraints

curveRadius = self._getCurveRadiusAtPoint(i)

if math.isfinite(curveRadius):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,11 @@ private void precalcValues() {
if (numPoints() > 0) {
for (int i = 0; i < allPoints.size(); i++) {
PathPoint point = allPoints.get(i);

if (point.constraints == null) {
point.constraints = globalConstraints;
}

double curveRadius = getCurveRadiusAtPoint(i, allPoints);

if (Double.isFinite(curveRadius)) {
Expand Down
Loading