Skip to content

Commit

Permalink
Update likelihood_field_model.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygao authored Mar 19, 2024
1 parent 326a733 commit 197d545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nav2_amcl/src/sensors/laser/likelihood_field_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ LikelihoodFieldModel::sensorFunction(LaserData * data, pf_sample_set_t * set)
// Pre-compute a couple of things
double z_hit_denom = 2 * self->sigma_hit_ * self->sigma_hit_;
double z_rand_mult = 1.0 / data->range_max;

step = (data->range_count - 1) / (self->max_beams_ - 1);

// Step size must be at least 1
if (step < 1) {
step = 1;
Expand Down

0 comments on commit 197d545

Please sign in to comment.