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

Velocity error of SurfaceTransformTask #43

Open
stephane-caron opened this issue Apr 24, 2018 · 0 comments
Open

Velocity error of SurfaceTransformTask #43

stephane-caron opened this issue Apr 24, 2018 · 0 comments

Comments

@stephane-caron
Copy link
Contributor

stephane-caron commented Apr 24, 2018

I think there is a problem with the formula of the velocity error (maybe acceleration as well), i.e. the time-derivative of the error vector, in the SurfaceTransformTask:

	sva::MotionVecd err_p = sva::transformVelocity(X_p_t, 1e-7);
	sva::MotionVecd V_p_p = jac_.velocity(mb, mbc, X_b_p_);
	sva::MotionVecd w_p_p = sva::MotionVecd(V_p_p.angular(), Eigen::Vector3d::Zero());
	sva::MotionVecd V_err_p = err_p.cross(w_p_p) - V_p_p;
	speed_ = -V_err_p.vector();

What @jorisv is trying to do here (section 4.2.6 of his PhD manuscript) is to derive the expression Err(X_p_t) (transformVelocity) over time. From spatial vector algebra:

(d(err) / dt)_A = d(err_A) / dt + v_A_A x err_A

where A is a frame that is mobile but in rotation only (why?), with the same rotational velocity as the p frame, and coincides with p in translation. Then, v_A_A corresponds to w_p_p.

The argument is then that d (err_A) / dt = 0 - V_p_p, but I think there's a problem here: if A has no translational velocity, the linear part of d (err_A) / dt should be zero.

What do we see?

I think what we see is mostly speed_ = the body velocity of the surface frame. After a quick check, err_p.cross(w_p_p) was between 1e-8 and 1e-14 in my current scenario. Also, seeing the body velocity is consistent with other tasks.

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

1 participant