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

Exchange State_start and State_end has a different result #15

Open
githublth opened this issue Aug 12, 2021 · 1 comment
Open

Exchange State_start and State_end has a different result #15

githublth opened this issue Aug 12, 2021 · 1 comment

Comments

@githublth
Copy link

hi, when i have parameter like as below:
image
the result is :
image
but when i exchange the State_start and Waypoints as this:
image
the result like this
image

obviously, the second one costs more time, I hope it have a result as the first one. is it normal?
Thanks!

@MariusBeul
Copy link

Yes, the behavior is expected. Simply exchanging the start and end state does not work. You also have to invert the velocity and acceleration. Imagine a trajectory starting in the origin and going to 1m. If you have a positive velocity, the trajectory is faster, since the target position is positive. But if you are starting at 1m and want to go to the origin, a negative initial velocity makes your trajectory faster. Thus, you have to invert the signs of the initial velocity, acceleration, etc. and also of the final velocity if there is one.
Thus, the mirrored form of [0.0,0.1,0.0] to [1.0,0.0,0.0] is [1.0,-0.1,0.0] to [0.0,0.0,0.0]

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