Python equivalent of Matlab bsplinepolytraj function?

Question:

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?

Asked By: ediblazetp

||

Answers:

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 !

Answered By: Aevr

After days of research and tests, I found this repository on Git that proposes several solutions to the path planning problem.

https://github.com/AtsushiSakai/PythonRobotics/tree/master/PathPlanning

I found it very useful, I hope other people can use it too.
Cheers!

Answered By: ediblazetp
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.