Open yakunsjtu opened 2 years ago
I haven't tried to calculate the second derivative of quaternion curves yet, and I don't even know what that would mean ... some kind of angular acceleration? But I'm quite sure that the curve is not C2 continuous, because the Euclidean CR spline isn't either. Strictly speaking, I haven't really calculated the first derivative either. But the logarithmic map (which is kinda related to the first derivative) is identical at the control points, so I would call that "C1", even if I can't prove that in any strict mathematical sense.
Anyway, I would expect the situation to be similar to Euclidean CR splines, but I can't give any mathematically sound statements about this.
Does that help? What do you need that information for?
Or if it can achieve higher order of continuity?
If we are talking about the "cubic" case: no. With 4 points that's impossible in the Euclidean case, and I don't see why this should be different for rotations.
If you want to use 6 points (for a "quintic" spline) or 8 (for "septic") you can try to apply the Barry-Goldman algorithm (which should work for arbitrary degrees), but I don't think that's what you want, right?
Actually I am using the quaternion spline to generate trajectory for robot arm. So the derivatives are also useful information. Because we need to compute the velocity and acceleration command to drive the robot.
Do you mean the Barry-Goldman algorithm can also compute the control points that interpolate a sequence of rotations?
I found a paper discussing the C2 continuous quintic spherical bezier curve for orientations. The derivatives are also discussed. And it is also near arc length parameterized. Also it is synchronized with the position spline. A constant feed and reduced angular acceleration interpolation algorithm for multi-axis machining
This article P8 provided a numerical way to compute the control points to achieve C2 continuity. But I could not understand the content...
Disclaimer: I have no experience with robotics or milling or anything like that, so be careful when using anything I'm writing here.
Do you mean the Barry-Goldman algorithm can also compute the control points that interpolate a sequence of rotations?
Yes, definitely: https://splines.readthedocs.io/en/latest/rotation/barry-goldman.html
Note that the (cubic) Barry-Goldman algorithm yields an interpolating spline with local control, which can therefore not have C2 continuity (it can only have two of these three things: interpolating, local control, C2 continuity).
I've only showed the cubic case, but it should be possible to use the Barry-Goldman algorithm to create a quintic spline, which I guess should have C2 continuity (but I'm not sure), while still having local control.
You would of course also have to come up with appropriate end conditions for the quintic case.
And they would not be (near) arc-length parameterized.
I found a paper discussing the C2 continuous quintic spherical bezier curve for orientations. The derivatives are also discussed. And it is also near arc length parameterized. Also it is synchronized with the position spline. A constant feed and reduced angular acceleration interpolation algorithm for multi-axis machining
Note that this paper uses "orientation unit vectors" (which form the unit sphere S2), while I'm using quaternions (which form the unit hypersphere S3). Therefore, they have one fewer degrees of freedom (which is enough, because the tool is spinning).
They are interpolating on S2 using something similar to "natural splines", which I have only described in the Euclidean case (https://splines.readthedocs.io/en/latest/euclidean/natural.html) but not for rotations (which I guess would be much more complicated).
They use an interpolating spline without local control, therefore they can achieve C2 continuity.
This article P8 provided a numerical way to compute the control points to achieve C2 continuity. But I could not understand the content...
Me neither!
But AFAIU they also use a spline without local control and can therefore achieve C2 continuity.
I don't understand enough to be able to implement this, but maybe you find some hints in their Python implementation: https://github.com/olivierverdier/bsplinelab?
I didn't find if it is C2 continuous in the documentation. Or if it can achieve higher order of continuity?