ethz-asl / curves

A library of curves for estimation.
BSD 3-Clause "New" or "Revised" License
74 stars 28 forks source link

Interpolation between two curves #18

Open gehrinch opened 10 years ago

gehrinch commented 10 years ago

There should be a tool which allows to extract an interpolated curve from two other curves depending on an interpolation parameter that is in range [0, 1].

A simplified example would be curve = linearlyInterpolate(curve1, curve2, t); t = 0.0 -> curve = curve1 t = 0.5 -> curve = 0.5_curve1 + 0.5_curve2 t = 1.0 -> curve = curve2

Should and how should we add this feature to this library?

furgalep commented 10 years ago

Would you keep the original curves underneath? If so, this is extremely easy to implement.

Yes! If this is useful, we could add this.

However, there would have to be a specific linear interpolation policy for each Value type.

And derivatives might be a problem. But the vector space version should be very easy.

gehrinch commented 10 years ago

What do you mean by "keep the original curves underneath"?

This feature is very useful. We already use it for gait transitions where we interpolate between two swing foot trajectories (from two different parameter sets).