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
easylyou and Kai-Tao Xie authored Sep 11, 2021
1 parent 2e6594c commit d47aba6
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 d47aba6

Please sign in to comment.