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

Piecewise linear function #50

Open
Jantsche opened this issue May 22, 2023 · 3 comments
Open

Piecewise linear function #50

Jantsche opened this issue May 22, 2023 · 3 comments

Comments

@Jantsche
Copy link

Hello,
Is there a way to use a piecewise linear function for the generalized position constraint?
Im trying to get a varying angle for the rotation of a spinning Disk in an experiment for gyro effects.
Using the piecewise polynom function i have managed to get a varying angle but the problem is, that the curve of the angle has quite large overshoots.
I thought that i could make the stepsize smaller to reduce these overshoots but that would lead to much manual writing of the data.
Could it be a command for the interpolation method different from "cSplineNatural"?

Best regards Jantsche

@foerg
Copy link
Contributor

foerg commented May 22, 2023

Hi,
when using generalized position constraints, the first derivative of the position function must be continuous. This condition is necessary as the acceleration has to be finite. Thus, a linear interpolation can not be used in conjunction with position constraints. However, you can also define a generalized acceleration constraint, where the acceleration function can even be discontinuous. Discontinuous functions can either be defined with "piecewise defined function" or with "symbolic function" using the keyword "condition".

@Jantsche
Copy link
Author

Hello,
I understand.
Is there any other way to set a defined angle that changes over time?
Because with an acceleration constraint, the setting of a predefined angle (i.e. an angle that you simply specify in radians) is not possible, is it?

@foerg
Copy link
Contributor

foerg commented May 23, 2023

It is. How does your function look like?

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