Conjugation

release/4.3a0
Frank Dellaert 2014-01-03 17:45:45 -05:00
parent 18dfd70295
commit 4b538d9648
1 changed files with 10 additions and 0 deletions

View File

@ -225,6 +225,16 @@ namespace gtsam {
/** compose two rotations */ /** compose two rotations */
Rot3 operator*(const Rot3& R2) const; Rot3 operator*(const Rot3& R2) const;
/**
* Conjugation: given a rotation acting in frame B, compute rotation c1Rc2 acting in a frame C
* @param cRb rotation from B frame to C frame
* @return c1Rc2 = cRb * b1Rb2 * cRb'
*/
Rot3 conjugate(const Rot3& cRb) const {
// TODO: do more efficiently by using Eigen or quaternion properties
return cRb * (*this) * cRb.inverse();
}
/** /**
* Return relative rotation D s.t. R2=D*R1, i.e. D=R2*R1' * Return relative rotation D s.t. R2=D*R1, i.e. D=R2*R1'
*/ */