DAIRLab / dairlib

MIT License
76 stars 27 forks source link

adding edge case for exponentialpluspiecewisepolynomial #201

Closed yangwill closed 3 years ago

yangwill commented 3 years ago

ExponentialPlusPiecewisePolynomial extends from PiecewiseTrajectory and not PiecewisePolynomial and therefore does not support EvalDerivative. This adds an edge case just for ExponentialPlusPiecewisePolynomial which is used by lipm_traj_gen.cc


This change is Reviewable

mposa commented 3 years ago

Seems OK--though if this is a computational bottleneck we could easily add EvalDerivative to ExponentialPlusPiecewisePolynomial

yangwill commented 3 years ago

I'm not sure we could avoid the main computational bottleneck which is the derivative of the exponential part (https://github.com/RobotLocomotion/drake/blob/master/common/trajectories/exponential_plus_piecewise_polynomial.cc#L44), the piecewise polynomial part is quick for our code because I think we only construct one segment.

I agree that this is a ugly fix though.