-
Notifications
You must be signed in to change notification settings - Fork 30
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
Create a WaypointTrajector class #312
Comments
Quick question: Can If not, is there a way to generalize it such that it can? Because it seems like the Spline definition is really implementing spline interpolation, since it's not like it's defining control points or some sort of inherent spline parameterization -- it's just finding a spline that passes through the set of waypoints, right? |
I was wondering the same thing! After some investigation, I think the (current) answer is no because each segment of the spline has different polynomial coefficients and Maybe it would be possible to model a |
Yeah, I suppose it gets a bit weird once you have each segment need different interpolation parameters. One thing that's kind of interesting though is that if you have fixed order of the segments of the spline, and you have specified the start and end waypoints to the Our existing Spline class is somewhat more general here, but it's interesting that for a certain subset of waypoints and fixed-order splines, this should be do-able. |
This is the way I would approach it, if we decide to go this way. The spline parameters are an implementation detail of the interpolator - not a formal argument required to evaluate the trajectory. The bigger issue is that I don't see a huge amount of value in this change, so I suggest leaving things as they are for now. |
Currently both the
Spline
class and theInterpolated
class have a few methods for "waypoints", which aregetNumWaypoints()
,getWaypoint(i)
andgetWaypointTime(i)
, which are not inherited from the base classTrajectory
.Those methods are mostly called in converting to some implicit path format, for example
DynamicPath
incomputeParabolicTiming()
.@brianhou suggested creating an abstract class
WaypointTrajectory
(in between base classTrajectory
andInterpolated
\Spline
) and defining all the "waypoints" operations in this class.The change will merge conversions based on "waypoints" from both
Interpolated
andSpline
into a single method, which will remove duplicate code.A very minor concern is that whether it is fair to consider
Spline
as aWaypointTrajectory
.Because
Spline
is a sequence of line segments.The "waypoints" of a
Spline
is "indirectly" obtained from segments.https://github.com/personalrobotics/aikido/blob/master/src/trajectory/Spline.cpp#L206
https://github.com/personalrobotics/aikido/blob/master/src/trajectory/Spline.cpp#L226
We would like to hear some comments before making the change.
The text was updated successfully, but these errors were encountered: