Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the initial pose was given manually, try motion_based_track #588

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/stella_vslam/tracking_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ bool tracking_module::track_current_frame() {
bool succeeded = false;

// Tracking mode
if (twist_is_valid_ && last_reloc_frm_id_ + 2 < curr_frm_.id_) {
if (twist_is_valid_) {
// if the motion model is valid
succeeded = frame_tracker_.motion_based_track(curr_frm_, last_frm_, twist_);
}
Expand Down Expand Up @@ -362,6 +362,8 @@ bool tracking_module::relocalize_by_pose(const pose_request& request) {
if (succeeded) {
last_reloc_frm_id_ = curr_frm_.id_;
last_reloc_frm_timestamp_ = curr_frm_.timestamp_;
// If the initial pose was given manually, use motion_based_track, expecting that the camera is not moving.
last_frm_ = curr_frm_;
}
}
else {
Expand Down
Loading