Updated uniform spacing modifiers#361
Merged
marip8 merged 7 commits intoros-industrial:masterfrom Jan 7, 2026
Merged
Conversation
bf2072e to
fc79117
Compare
fc79117 to
60f69f3
Compare
60f69f3 to
fafb868
Compare
This was referenced Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The existing uniform spline tool path modifier often causes crashes and has a lot of unecessary overlap with the uniform linear tool path modifier, which is capable of doing spline interpolation using
vtkTransformInterpolator. Looking into this more deeply, it appears that the full spline interpolation method ofvtkTransformInterpolatordoes not create valid pose rotations. You can however set the position interpolation to be splined and the orientation interpolation to be linear which fixes the issue somewhat, but the resulting rotations (specifically the x-axes) visibly do not track the spline path very well.The
vtkTransformInterpolatorandvtkSplineclasses do not give access to the spline derivatives, so it's not really possible to correct the orientations after the fact.Also, it appears that the
vtkParametricSpline::ParameterizeByLengthoption evaluates length as the linear distance between knot points, not the actual length of the spline between them, leading to some inaccuracy.Solution
Using the spline code developed in #360, it was relatively straightforward to replace the
vtkTransformInterpolatorwith an Eigen-based B-spline to do uniform re-sampling of a tool path. A B-spline of degree 1 is also equivalent to linear interpolation, so this method is capable of doing both linear and polynomial spline interpolation. This method also calculates the spline arc distance using numerical integration of the spline first derivative with Simpson's rule which results in more accurate waypoint spacing.