Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Optimal trajectory generation

Status
Not open for further replies.

johnfulgor

Industrial
Nov 1, 2016
1
Hello all,
I have a two dimensional trajectory y=f(x), defined by a dense vector of 10.000 or so points. Given the maximum acceleration and speed of y(t) and x(t), I need to calculate the optimal x(t), to minimize the overall time. How can do it? Is there some C or C++ routine around in the network?
Thank you.
 
Replies continue below

Recommended for you

I would make two cubic splines. One for y(u) and one for x(u) where u is the index for both the x and y spline. you know the desired velocity you want it v(t)=sqrt(y'(u)^2+x'(u))^2) so solve for u. Since you probably just have a set of points for x and y you will need to be able find the derivative at each point u to compute the next point. Hopefully your spine function has this capability.

Better motion controllers have functions to make this easier. Writing your own from scratch will take some time.

Peter Nachtwey
Delta Computer Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor