Skip to content

Commit

Permalink
Remove g2o::SE3Quat from interfaces (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymd-stella committed Jun 25, 2023
1 parent b73577f commit c129558
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
4 changes: 0 additions & 4 deletions src/stella_vslam/data/frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ void frame::set_pose_cw(const Mat44_t& pose_cw) {
trans_wc_ = -rot_cw_.transpose() * trans_cw_;
}

void frame::set_pose_cw(const g2o::SE3Quat& pose_cw) {
set_pose_cw(util::converter::to_eigen_mat(pose_cw));
}

Mat44_t frame::get_pose_cw() const {
return pose_cw_;
}
Expand Down
6 changes: 0 additions & 6 deletions src/stella_vslam/data/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ class frame {
*/
void set_pose_cw(const Mat44_t& pose_cw);

/**
* Set camera pose and refresh rotation and translation
* @param pose_cw
*/
void set_pose_cw(const g2o::SE3Quat& pose_cw);

/**
* Get camera pose
*/
Expand Down
4 changes: 0 additions & 4 deletions src/stella_vslam/data/keyframe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ void keyframe::set_pose_cw(const Mat44_t& pose_cw) {
pose_wc_.block<3, 1>(0, 3) = trans_wc_;
}

void keyframe::set_pose_cw(const g2o::SE3Quat& pose_cw) {
set_pose_cw(util::converter::to_eigen_mat(pose_cw));
}

Mat44_t keyframe::get_pose_cw() const {
std::lock_guard<std::mutex> lock(mtx_pose_);
return pose_cw_;
Expand Down
6 changes: 0 additions & 6 deletions src/stella_vslam/data/keyframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <atomic>
#include <memory>

#include <g2o/types/sba/types_six_dof_expmap.h>
#include <nlohmann/json_fwd.hpp>
#include <sqlite3.h>

Expand Down Expand Up @@ -107,11 +106,6 @@ class keyframe : public std::enable_shared_from_this<keyframe> {
*/
void set_pose_cw(const Mat44_t& pose_cw);

/**
* Set camera pose
*/
void set_pose_cw(const g2o::SE3Quat& pose_cw);

/**
* Get the camera pose
*/
Expand Down
2 changes: 1 addition & 1 deletion src/stella_vslam/optimize/local_bundle_adjuster_g2o.cc
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ void local_bundle_adjuster_g2o::optimize(data::map_database* map_db,
const auto& local_keyfrm = id_local_keyfrm_pair.second;

auto keyfrm_vtx = keyfrm_vtx_container.get_vertex(local_keyfrm);
local_keyfrm->set_pose_cw(keyfrm_vtx->estimate());
local_keyfrm->set_pose_cw(util::converter::to_eigen_mat(keyfrm_vtx->estimate()));
}

for (const auto& id_local_lm_pair : local_lms) {
Expand Down

0 comments on commit c129558

Please sign in to comment.