Skip to content

Commit

Permalink
Not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
qhdwight committed Feb 26, 2024
1 parent c07d276 commit 1879ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulator/simulator.controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ namespace mrover {
if (key == mToggleCameraLockKey) {
if (mCameraInRoverTarget) {
mCameraInRoverTarget = std::nullopt;

Eigen::Matrix3d rotationMatrix = mCameraInWorld.transform().block<3, 3>(0, 0);

Eigen::Vector3d left = rotationMatrix.col(1);
Eigen::Vector3d leftWithoutRoll = left;
leftWithoutRoll.z() = 0;
leftWithoutRoll.normalize();

auto q = Eigen::Quaterniond{}.setFromTwoVectors(left, leftWithoutRoll);
mCameraInWorld.asSO3() = SO3d{q} * mCameraInWorld.asSO3();
Expand Down

0 comments on commit 1879ffa

Please sign in to comment.