Fix quaternion typos.
PiperOrigin-RevId: 453203844 Change-Id: I7d788c21bb00b7746f941fb2cf755f0b046e35f2
This commit is contained in:
committed by
Copybara-Service
parent
16baac9353
commit
53d3220fcc
@@ -165,7 +165,7 @@ void mju_quat2Mat(mjtNum res[9], const mjtNum quat[4]) {
|
||||
|
||||
|
||||
|
||||
// convert 3D rotation matrix to quaterion
|
||||
// convert 3D rotation matrix to quaternion
|
||||
void mju_mat2Quat(mjtNum quat[4], const mjtNum mat[9]) {
|
||||
// q0 largest
|
||||
if (mat[0]+mat[4]+mat[8]>0) {
|
||||
@@ -214,7 +214,7 @@ void mju_derivQuat(mjtNum res[4], const mjtNum quat[4], const mjtNum vel[3]) {
|
||||
|
||||
|
||||
|
||||
// integrate quaterion given 3D angular velocity
|
||||
// integrate quaternion given 3D angular velocity
|
||||
void mju_quatIntegrate(mjtNum quat[4], const mjtNum vel[3], mjtNum scale) {
|
||||
mjtNum angle, tmp[4], qrot[4];
|
||||
|
||||
@@ -257,7 +257,7 @@ void mju_quatZ2Vec(mjtNum quat[4], const mjtNum vec[3]) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make quaterion from angle and axis
|
||||
// make quaternion from angle and axis
|
||||
a = mju_atan2(a, mju_dot3(vn, z));
|
||||
mju_axisAngle2Quat(quat, axis, a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user