dart
dart copied to clipboard
Avoid using cross product for "v x (a v)" expecting the result is zero
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)
.
Is this related to the rigid body rotation errors?
This is related to the angular momentum error but not to other errors such as linear velocity error.