| 159 | // General Pose Update ---------- |
| 160 | |
| 161 | colvec pose_update(const colvec& X1, const colvec& X2) { |
| 162 | mat R1 = ypr_to_R(X1.rows(3, 5)); |
| 163 | mat R2 = ypr_to_R(X2.rows(3, 5)); |
| 164 | mat R3 = R1 * R2; |
| 165 | |
| 166 | colvec X3xyz = X1.rows(0, 2) + R1 * X2.rows(0, 2); |
| 167 | colvec X3ypr = R_to_ypr(R3); |
| 168 | |
| 169 | colvec X3 = join_cols(X3xyz, X3ypr); |
| 170 | return X3; |
| 171 | } |
| 172 | |
| 173 | colvec pose_inverse(const colvec& X) { |
| 174 | mat R = ypr_to_R(X.rows(3, 5)); |
no test coverage detected