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

Non-descriptive error while using ctraj and tpoly #31

Closed
Finnepinnen opened this issue Oct 25, 2018 · 1 comment
Closed

Non-descriptive error while using ctraj and tpoly #31

Finnepinnen opened this issue Oct 25, 2018 · 1 comment

Comments

@Finnepinnen
Copy link

Hi,

thank you for a fantastic toolbox. It saved my Master thesis!
While trying out robot trajectories I found an error which has an error message that doesn't really give any information about the source of the error.

Code example:

clear all;
mdl_puma560;
steps = 23;
T1=SE3(0.4,0.2,0)*SE3.Rx(pi);
T2=SE3(0.4,-0.2,0)*SE3.Rx(pi);
s = tpoly(0, 1, steps);
Ts=ctraj(T1,T2, s);

I found that the error:

Error using SE3/interp (line 437)
error in trinterp
Error in SE3/ctraj (line 474)
traj(i) = T0.interp(T1, s(i));
Error in untitled4 (line 13)
Ts=ctraj(T1,T2, s);

Shows up as soon as steps is less than 23.

Best regards
Peter Eriksson

@petercorke
Copy link
Owner

I see that as well, but the error message is a bit more informative for me, maybe I'm using a newer version. Seems the problem is tpoly() which outputs a value of s > 1, but not by much. Some numerical error in computing it, clip the value and all should be good.

steps = 23;
s = tpoly(0, 1, steps);
Ts=ctraj(T1,T2, s);
Error using SE3/interp (line 443)
value of S outside interval [0,1]
Error in SE3/ctraj (line 497)
traj(i) = T0.interp(T1, s(i));

max(s)
ans =
1.0000

max(s)-1
ans =
4.4409e-16

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