Skip to content

Commit

Permalink
fix(ndt_scan_matcher): added coping input_source when rebuilding ndt (#…
Browse files Browse the repository at this point in the history
…6464)

Added coping input_source when rebuilding ndt

Signed-off-by: Shintaro SAKODA <[email protected]>
Co-authored-by: Anh Nguyen <[email protected]>
  • Loading branch information
SakodaShintaro and anhnv3991 authored Feb 22, 2024
1 parent 2389c15 commit 6af3496
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions localization/ndt_scan_matcher/src/map_update_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ void MapUpdateModule::update_map(const geometry_msgs::msg::Point & position)
if (need_rebuild_) {
ndt_ptr_mutex_->lock();
auto param = ndt_ptr_->getParams();
auto input_source = ndt_ptr_->getInputSource();

ndt_ptr_.reset(new NdtType);

ndt_ptr_->setParams(param);

update_ndt(position, *ndt_ptr_);
ndt_ptr_->setInputSource(input_source);
ndt_ptr_mutex_->unlock();
need_rebuild_ = false;
} else {
Expand Down

0 comments on commit 6af3496

Please sign in to comment.