Home > Back-end >  Python equivalent of Matlab bsplinepolytraj function?
Python equivalent of Matlab bsplinepolytraj function?

Time:10-05

Good morning everyone, this is my first question so I apologize in advance for any kind of mistake.

Let me explain my problem: I need to generate a trajectory for a robotic arm from a set of waypoints. In Matlab I used the function bsplinepolytraj, but now I want to run the code in Python and I can't find an equivalent function. What I am looking for should be able to give me the same values in output, namely position, velocity and acceleration.

Can you help me with this?

CodePudding user response:

Have you tried looking into this DRAKE tool ? I doubt there is a hard equivalent to the matlab function but they seem to do something in the realm of what you need in Python.

https://drake.mit.edu/pydrake/pydrake.trajectories.html#

Otherwise, and if you know how the matlab function works, you can try scipy B-spline function to implement the matlab functionality.

https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.BSpline.html

If you do an exact matlab replica, don't hesitate to share it via github if you want. I'm pretty sure it will be greatly appreciated !

  • Related