Skip to content

Commit

Permalink
add semantic checks (#2557)
Browse files Browse the repository at this point in the history
Co-authored-by: Kai-Tao Xie <[email protected]>
  • Loading branch information
2 people authored and SteveMacenski committed Sep 14, 2021
1 parent f4b65b0 commit 87dfb3c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nav2_amcl/src/amcl_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,13 @@ AmclNode::initParameters()
max_particles_ = min_particles_;
}

if (resample_interval_ <= 0) {
RCLCPP_WARN(
get_logger(), "You've set resample_interval to be zero or negtive,"
" this isn't allowed so it will be set to default value to 1.");
resample_interval_ = 1;
}

if (always_reset_initial_pose_) {
initial_pose_is_known_ = false;
}
Expand Down

0 comments on commit 87dfb3c

Please sign in to comment.