Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start/exit velocity of s-curve interpolation #1

Open
maisonsmd opened this issue Nov 7, 2020 · 1 comment
Open

Start/exit velocity of s-curve interpolation #1

maisonsmd opened this issue Nov 7, 2020 · 1 comment

Comments

@maisonsmd
Copy link

Hi, I'm very interested in the result you've archirved, and I tried to implement it to C++.
But I have 1 question, can your s-curve interpolation method implement start velocity and exit velocity?

@xenovacivus
Copy link
Owner

The s-curve solver on https://xenovacivus.github.io/motion-control/curve-simulator.html uses an iterative approach - it adjusts the time of each curve portion until the curve meets the input parameters (holding distance constant). It does assume starting and ending velocity are zero - but it's not a strict requirement. But if the starting and ending velocity are not zero, there are a number of new cases that need to be handled (like a starting velocity greater than the target velocity - though you could just assume that will never happen). It's also possible to compute a direct solution for an s-curve with non-zero initial/final velocity without iteration. A direct solution will require solving the zeros of a cube root equation and handle complex numbers in intermediate steps.

The real fun starts when initial/final acceleration is not zero :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants