Skip to content

Commit

Permalink
Merge pull request #226 from smnogar/clang-fixes
Browse files Browse the repository at this point in the history
Small Clang Fixes
  • Loading branch information
goldbattle authored Feb 10, 2022
2 parents 8170e57 + dfc9df5 commit fe6e0e7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ov_msckf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsee -fomit-frame-pointer -fno-signed-zeros -fno-math-errno -funroll-loops")

# Enable debug flags (use if you want to debug in gdb)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall -Wuninitialized -Wmaybe-uninitialized -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall -Wuninitialized -fno-omit-frame-pointer")

# Find our ROS version!
# NOTE: Default to using the ROS1 package if both are in our enviroment
Expand Down
4 changes: 3 additions & 1 deletion ov_msckf/src/ros/ROS2Visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,9 @@ void ROS2Visualizer::publish_groundtruth() {
Eigen::Matrix<double, 6, 6> covariance = StateHelper::get_marginal_covariance(_app->get_state(), statevars);

// Calculate NEES values
double ori_nees = 2 * quat_diff.block(0, 0, 3, 1).dot(covariance.block(0, 0, 3, 3).inverse() * 2 * quat_diff.block(0, 0, 3, 1));
Eigen::Vector3d quat_diff_vec = quat_diff.block(0, 0, 3, 1);
Eigen::Vector3d cov_vec = covariance.block(0, 0, 3, 3).inverse() * 2 * quat_diff.block(0, 0, 3, 1);
double ori_nees = 2 * quat_diff_vec.dot(cov_vec);
Eigen::Vector3d errpos = state_ekf.block(4, 0, 3, 1) - state_gt.block(5, 0, 3, 1);
double pos_nees = errpos.transpose() * covariance.block(3, 3, 3, 3).inverse() * errpos;

Expand Down
2 changes: 1 addition & 1 deletion ov_msckf/src/update/UpdaterMSCKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void UpdaterMSCKF::update(std::shared_ptr<State> state, std::vector<std::shared_
return;

// Start timing
boost::posix_time::ptime rT0, rT1, rT2, rT3, rT4, rT5, rT6, rT7;
boost::posix_time::ptime rT0, rT1, rT2, rT3, rT4, rT5;
rT0 = boost::posix_time::microsec_clock::local_time();

// 0. Get all timestamps our clones are at (and thus valid measurement times)
Expand Down
4 changes: 2 additions & 2 deletions ov_msckf/src/update/UpdaterSLAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void UpdaterSLAM::delayed_init(std::shared_ptr<State> state, std::vector<std::sh
return;

// Start timing
boost::posix_time::ptime rT0, rT1, rT2, rT3, rT4, rT5, rT6, rT7;
boost::posix_time::ptime rT0, rT1, rT2, rT3;
rT0 = boost::posix_time::microsec_clock::local_time();

// 0. Get all timestamps our clones are at (and thus valid measurement times)
Expand Down Expand Up @@ -224,7 +224,7 @@ void UpdaterSLAM::update(std::shared_ptr<State> state, std::vector<std::shared_p
return;

// Start timing
boost::posix_time::ptime rT0, rT1, rT2, rT3, rT4, rT5, rT6, rT7;
boost::posix_time::ptime rT0, rT1, rT2, rT3;
rT0 = boost::posix_time::microsec_clock::local_time();

// 0. Get all timestamps our clones are at (and thus valid measurement times)
Expand Down

0 comments on commit fe6e0e7

Please sign in to comment.