Skip to content

Updated uniform spacing modifiers#361

Merged
marip8 merged 7 commits intoros-industrial:masterfrom
marip8:update/uniform-spacing-modifiers
Jan 7, 2026
Merged

Updated uniform spacing modifiers#361
marip8 merged 7 commits intoros-industrial:masterfrom
marip8:update/uniform-spacing-modifiers

Conversation

@marip8
Copy link
Member

@marip8 marip8 commented Jan 3, 2026

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 of vtkTransformInterpolator does 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.

Screenshot from 2026-01-02 19-35-08

The vtkTransformInterpolator and vtkSpline classes 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::ParameterizeByLength option 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 vtkTransformInterpolator with 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.

Screenshot from 2026-01-02 19-29-28

@marip8 marip8 force-pushed the update/uniform-spacing-modifiers branch from bf2072e to fc79117 Compare January 7, 2026 18:01
@marip8 marip8 force-pushed the update/uniform-spacing-modifiers branch from fc79117 to 60f69f3 Compare January 7, 2026 19:20
@marip8 marip8 force-pushed the update/uniform-spacing-modifiers branch from 60f69f3 to fafb868 Compare January 7, 2026 19:23
@marip8 marip8 merged commit bcaa186 into ros-industrial:master Jan 7, 2026
9 of 10 checks passed
@marip8 marip8 deleted the update/uniform-spacing-modifiers branch January 7, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant