RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.32k stars 1.26k forks source link

Provide Derivatives in FunctionHandleTrajectory #22076

Open cohnt opened 1 day ago

cohnt commented 1 day ago

21093 introduced a way for the user to specify trajectories as the image of an arbitrary function, completing the feature request in #20699. However, it does not yet support computing derivatives of the trajectory, which is needed for trajectory processing algorithms like Toppra. I think this should be pretty straightforward to implement, so I'll self-assign (and ask for help if I get stuck).

cohnt commented 1 day ago

Actually, maybe this is more complicated than I thought, since I don't think we can use AutoDiffXd to get higher order derivatives. Would love to hear if people have other ideas.

I know Russ suggested allowing a user to provide a function if the derivatives are known. Or we could provide a finite-difference approximation.