-
Notifications
You must be signed in to change notification settings - Fork 768
Trajectory alignment by interpolation [proof of concept implementation] #512
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
Comments
I have named the generator |
Maybe the velocity is not constant during a turn. How does this keep a constant angular and linear velocity in the turn? |
I don't understand this question, I'm afraid. The code simply uses linear interpolation to compute the estimated state at each time of the reference trajectory. This implies a constant linear velocity with respect to the world, and constant angular velocity. |
To keep angular velocity constant, you have to take into account the linear velocity. The solution you provide is not trivially correct AFAIK. I would seek a mathematical proof before implementing as is. (here is an explanation, but the essence of the problem is the fact that the coordinate frame rotates as you move) |
Oh, I think I see where the confusion arises. In this case, both the linear and angular velocity are assumed to be constant in the world frame. So the robot is moving in a straight line (via LERP), and rotating smoothly (via quaternion SLERP) between orientations, over the same time interval. It's like imagining the robot moving along the straight line between its two nearest sampling points, while simultaneously rotating - both motions occurring at constant rates with respect to the world frame, not the robot’s own body frame. |
To be clear, the linear velocity in the body frame is most certainly not constant. |
Hi, I did not find a way to do trajectory alignment by interpolation of the estimated trajectory, which I think is a fairly normal thing to have in a package such as this.
For each time
t
in the reference trajectory, the code below will find the nearest next timestept_next
and the one before,t_prev
. It will then interpolate between the poses att_next
andt_prev
according tot
.I'm sure there is a better way to do this with the stuff in
lie.py
but the above code works.The text was updated successfully, but these errors were encountered: