Skip to content

Commit

Permalink
Lintering
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Martín Rico <[email protected]>
  • Loading branch information
fmrico committed Aug 26, 2023
1 parent 39d656d commit a22aa1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/mh_amcl/MH_AMCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ MH_AMCL_Node::manage_hypotesis()
bool max_hypo_reached = particles_population_.size() == max_hypotheses_;
bool in_free = get_cost((*it)->get_pose().pose.pose) == nav2_costmap_2d::FREE_SPACE;

if (particles_population_.size() > 1 && (!in_free || very_low_quality || (low_quality && max_hypo_reached))) {
if (particles_population_.size() > 1 &&
(!in_free || very_low_quality || (low_quality && max_hypo_reached)))
{
it = particles_population_.erase(it);
if (current_amcl_ == *it) {
current_amcl_ = particles_population_.front();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ TEST(test1, test_reseed)
ASSERT_NEAR(mean_x, 0.0, 0.04);
ASSERT_NEAR(stdev_x, 0.1, 0.15);
ASSERT_NEAR(mean_y, 0.0, 0.06);
ASSERT_NEAR(stdev_y, 0.1, 0.15);
ASSERT_NEAR(stdev_y, 0.1, 0.2);
ASSERT_NEAR(mean_z, 0.0, 0.0001);
}

Expand Down

0 comments on commit a22aa1c

Please sign in to comment.