-
Notifications
You must be signed in to change notification settings - Fork 102
Allow higher order spline derivatives. #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,12 +133,12 @@ def __call__(self, t: float) -> SE3: | |
| """ | ||
| return SE3.Rt(t=self.spline_xyz(t), R=self.spline_so3(t).as_matrix()) | ||
|
|
||
| def derivative(self, t: float) -> Twist3: | ||
| linear_vel = self.spline_xyz.derivative()(t) | ||
| angular_vel = self.spline_so3( | ||
| t, 1 | ||
| def derivative(self, t: float, order: int = 1) -> Twist3: | ||
| linear = self.spline_xyz.derivative(order)(t) | ||
| angular = self.spline_so3( | ||
| t, order | ||
| ) # 1 is angular rate, 2 is angular acceleration | ||
| return Twist3(linear_vel, angular_vel) | ||
| return Twist3(linear, angular) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Careful with semantics — This will work but the usage doesn't match with the documentation for the class. Perhaps need a VelocityTwist3 class. Are you simply looking for a container to hold (v,ω) like a ROS Twist message? |
||
|
|
||
|
|
||
| class SplineFit: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some warning that this only works for order = [1,2]. Current system throws a value error for order != [0,1,2] but will fail on order 0 with a "ValueError: bad value to Twist constructor" error. We should check and throw errors for order != [1,2].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing that