dart icon indicating copy to clipboard operation
dart copied to clipboard

Avoid using cross product for "v x (a v)" expecting the result is zero

Open jslee02 opened this issue 10 years ago • 2 comments

The result of v x (a v) is not zero.

double a = 10.0;
Eigen::Vector3d v = Eigen::Vector3d::Random();

Eigen::Vector3d res1 = v.cross(v);  // res1 is zero.
Eigen::Vector3d res2 = v.cross(a * v);  // res2 is not zero!

This case occurs in math::dad(V, GV).

jslee02 avatar Aug 05 '14 16:08 jslee02

Is this related to the rigid body rotation errors?

scpeters avatar Aug 05 '14 16:08 scpeters

This is related to the angular momentum error but not to other errors such as linear velocity error.

jslee02 avatar Aug 05 '14 16:08 jslee02