Skip to content

Commit

Permalink
Bugfix: use current keyframe when calculating covariances
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyjchen committed Apr 11, 2022
1 parent d43a1eb commit c207f68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dlo/odom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1166,13 +1166,13 @@ void dlo::OdomNode::updateKeyframes() {
this->keyframes.push_back(std::make_pair(std::make_pair(this->pose, this->rotq), this->current_scan_t));

// compute kdtree and keyframe normals (use gicp_s2s input source as temporary storage because it will be overwritten by setInputSources())
*this->keyframes_cloud += *this->current_scan_t;
*this->keyframe_cloud = *this->current_scan_t;

this->gicp_s2s.setInputSource(this->keyframe_cloud);
this->gicp_s2s.calculateSourceCovariances();
this->keyframe_normals.push_back(this->gicp_s2s.getSourceCovariances());

*this->keyframes_cloud += *this->current_scan_t;
*this->keyframe_cloud = *this->current_scan_t;

this->publish_keyframe_thread = std::thread( &dlo::OdomNode::publishKeyframe, this );
this->publish_keyframe_thread.detach();

Expand Down

0 comments on commit c207f68

Please sign in to comment.