scurve trajectory planner
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
[edit]
Just checked and it does seem to be adjusting gamma11 and gamma 21 but it always ends up being zero which does not quite look right to me.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
Attachments:
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Away
- Platinum Member
-
- Posts: 2312
- Thank you received: 2090
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Away
- Platinum Member
-
- Posts: 2312
- Thank you received: 2090
Yes, kappa10 is start curvature in z direction.
Gamma11 = y11, is the rigid property of the clothoid. if 0, then straight line. When 0.001 then clothoid begins to curve in a direction depending the sign off y11.
and now everything is off:
Keep also an eye on the GNU plot display max values. "set xrange [-20:80]\n"
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
Solution found after 1000000 iterations: gamma10 = -0.000148, gamma20 = 0.000011, s1 = 66.624893
Strange that it thinks it has succeeded when the residual is still way off (looks like its happy to have found a local minimum or something):
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
// Set up the Nelder-Mead solver
const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex2;
gsl_multimin_fminimizer *s = gsl_multimin_fminimizer_alloc(T, 3);
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
www.gnu.org/software/gsl/doc/html/multimin.html
So in my opinion we are using the wrong solver.
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
www.gnu.org/software/gsl/doc/html/nls.ht...east-squares-example
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Away
- Platinum Member
-
- Posts: 2312
- Thank you received: 2090
So in my opinion we are using the wrong solver.
Haha yes indeed we now use : Nelder-Mead simplex method
For now this solver prooved our codebase works ok.
Maybe we can switch solvers with a flag.
Then we can also measure different solvers performance time and choose the best one.
We will add a new dogleg solver soon, as libdogleg was kind of problematic. Github repository
also say's better to use seres solver.
The gauss now works without junction flaws, error solved in eq14_gauss.
It was kind off trickie error. It needed the theta, kappa, sharpness at the given distance.
This in combination with the gauss method, is tricky.
Result:
The drift vs gauss function in the example without fit method:
github updated
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4170
- Thank you received: 1827
Playing around with one of the examples linked above, it looks like we could possibly run 'levenberg-marquard', 'dogleg' and 'double dogleg' and '2D subspace' methods with our function and the Jacobian:
/* define function to be minimized */
fdf.f = func_f;
fdf.df = func_df;
//fdf.fvv = func_fvv;
fdf.n = n;
fdf.p = p;
fdf.params = ¶ms;
/* starting point */
gsl_vector_set(x, 0, 6.0);
gsl_vector_set(x, 1, 14.5);
fprintf(stderr, "%-25s %-6s %-5s %-5s %-13s %-12s %-13s %-15s\n",
"Method", "NITER", "NFEV", "NJEV", "Initial Cost",
"Final cost", "Final cond(J)", "Final x");
fdf_params.trs = gsl_multifit_nlinear_trs_lm;
solve_system(x, &fdf, &fdf_params);
//fdf_params.trs = gsl_multifit_nlinear_trs_lmaccel;
//solve_system(x, &fdf, &fdf_params);
fdf_params.trs = gsl_multifit_nlinear_trs_dogleg;
solve_system(x, &fdf, &fdf_params);
fdf_params.trs = gsl_multifit_nlinear_trs_ddogleg;
solve_system(x, &fdf, &fdf_params);
fdf_params.trs = gsl_multifit_nlinear_trs_subspace2D;
solve_system(x, &fdf, &fdf_params);
gsl_vector_free(f);
gsl_vector_free(x);
return 0;
Please Log in or Create an account to join the conversation.