Skip to content

Commit

Permalink
Fix string equality warnings in SplineFit class (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
scastro-bdai authored Dec 30, 2024
1 parent 142d6ac commit 3d21b06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spatialmath/spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ def stochastic_downsample_interpolation(
)

sample_time = self.time_data[candidate_removal_index]
if check_type is "local":
if check_type == "local":
angular_error = SO3(self.pose_data[candidate_removal_index]).angdist(
SO3(self.spline.spline_so3(sample_time).as_matrix())
)
euclidean_error = np.linalg.norm(
self.pose_data[candidate_removal_index].t - self.spline.spline_xyz(sample_time)
)
elif check_type is "global":
elif check_type == "global":
angular_error = self.max_angular_error()
euclidean_error = self.max_euclidean_error()
else:
Expand Down

0 comments on commit 3d21b06

Please sign in to comment.