Skip to content

Commit 78a9a98

Browse files
authored
V3 VIO correction (#1346)
1 parent 31665cb commit 78a9a98

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/basalt/BasaltVIO.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ void BasaltVIO::buildInternal() {
3131
imu.addCallback(std::bind(&BasaltVIO::imuCB, this, std::placeholders::_1));
3232

3333
basalt::PoseState<double>::SE3 initTrans(Eigen::Quaterniond::Identity(), Eigen::Vector3d(0, 0, 0));
34-
Eigen::Matrix<double, 3, 3> R180;
35-
R180 << -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0;
36-
Eigen::Quaterniond q180(R180);
37-
basalt::PoseState<double>::SE3 opticalTransform180(q180, Eigen::Vector3d(0, 0, 0));
34+
Eigen::Matrix<double, 3, 3> R;
35+
R << 0.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0;
36+
Eigen::Quaterniond q(R);
37+
basalt::PoseState<double>::SE3 initialRotation(q, Eigen::Vector3d(0, 0, 0));
3838
// to output pose in FLU world coordinates
39-
localTransform = std::make_shared<basalt::PoseState<double>::SE3>(initTrans * opticalTransform180.inverse());
39+
localTransform = std::make_shared<basalt::PoseState<double>::SE3>(initTrans * initialRotation.inverse());
4040
setDefaultVIOConfig();
4141
}
4242

0 commit comments

Comments
 (0)