We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2aee50 commit 1f6ed4aCopy full SHA for 1f6ed4a
localization/ndt_scan_matcher/src/map_update_module.cpp
@@ -78,7 +78,16 @@ void MapUpdateModule::update_map(const geometry_msgs::msg::Point & position)
78
79
ndt_ptr_->setParams(param);
80
81
- update_ndt(position, *ndt_ptr_);
+ const bool updated = update_ndt(position, *ndt_ptr_);
82
+ if (!updated) {
83
+ RCLCPP_ERROR_STREAM_THROTTLE(
84
+ logger_, *clock_, 1000,
85
+ "update_ndt failed. If this happens with initial position estimation, make sure that"
86
+ "(1) the initial position matches the pcd map and (2) the map_loader is working properly.");
87
+ last_update_position_ = position;
88
+ ndt_ptr_mutex_->unlock();
89
+ return;
90
+ }
91
ndt_ptr_->setInputSource(input_source);
92
ndt_ptr_mutex_->unlock();
93
need_rebuild_ = false;
0 commit comments