We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a29e647 commit 0117e35Copy full SHA for 0117e35
spatialmath/spline.py
@@ -133,12 +133,12 @@ def __call__(self, t: float) -> SE3:
133
"""
134
return SE3.Rt(t=self.spline_xyz(t), R=self.spline_so3(t).as_matrix())
135
136
- def derivative(self, t: float) -> Twist3:
137
- linear_vel = self.spline_xyz.derivative()(t)
138
- angular_vel = self.spline_so3(
139
- t, 1
+ def derivative(self, t: float, order: int = 1) -> Twist3:
+ linear = self.spline_xyz.derivative(order)(t)
+ angular = self.spline_so3(
+ t, order
140
) # 1 is angular rate, 2 is angular acceleration
141
- return Twist3(linear_vel, angular_vel)
+ return Twist3(linear, angular)
142
143
144
class SplineFit:
0 commit comments