From 6351f5c03100b0e12d1b47a1c8c75b143e18dedd Mon Sep 17 00:00:00 2001 From: gfuse Date: Sat, 28 Aug 2021 18:11:10 +0200 Subject: [PATCH] conert pitch into roll --- GPU_version/vio/include/vio/frame.h | 11 ++++---- GPU_version/vio/include/vio/global.h | 32 ++++++++-------------- GPU_version/vio/kernel/compute-residual.cl | 28 +++++++++++++------ GPU_version/vio/src/depth_filter.cpp | 10 +++---- 4 files changed, 42 insertions(+), 39 deletions(-) diff --git a/GPU_version/vio/include/vio/frame.h b/GPU_version/vio/include/vio/frame.h index bc47419..3cdc53a 100644 --- a/GPU_version/vio/include/vio/frame.h +++ b/GPU_version/vio/include/vio/frame.h @@ -126,11 +126,12 @@ public: inline SE3 getSE3Inv() const{ //TODO add 15 degree roll orientation - Eigen::Matrix R; - R<= 1) - pitch = std::copysign(M_PI / 2.0, pitch); // use 90 degrees if out of range - else - pitch = std::asin(pitch); + auto euler = q.toRotationMatrix().eulerAngles(0, 1, 2);//roll,pitch,yaw Eigen::Matrix R; - R<= 1) - pitch = std::copysign(M_PI / 2.0, pitch); // use 90 degrees if out of range - else - pitch = std::asin(pitch); - Eigen::Matrix R; - R< R; + R< R; - R<ftr->frame->T_f_w_.pitch()-frame->T_f_w_.pitch(),it->ftr->frame->T_f_w_.se2().translation()- frame->T_f_w_.se2().translation()); - Eigen::Matrix R; ///TODO add 15 degrees roll orientation - R<mu * it->ftr->f) ); if(xyz_f.z() < 0.0) { ++it; // behind the camera