Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handle mismatch octomap #20

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KendallRanConley
Copy link
Contributor

@KendallRanConley KendallRanConley commented Nov 30, 2021

When there was a large difference between the size of the octomap
and the regualr map, amcl would endlessly restart.

Handle the bad allocation that results from mismatched octomaps.

ROS-816


This change is Reviewable

When there was a large difference between the size of the octomap
and the regualr map, amcl would endlessly restart.

Handle the bad allocation that results from mismatched octomaps.

ROS-816
@c-andy-martin
Copy link
Contributor


src/amcl/map/octomap.cpp, line 189 at r1 (raw file):

  }
  catch (std::bad_alloc){
    ROS_ERROR("Bad allocation hit when attempting to resize pose indices");

I think this is just hiding the real bug. The real bug is somewhere up above. Likely we are screwing up and getting the max < min so we end up crossing zero and getting a huge number for num_poses_. My guess of the real bug is that around line 143 we take max of 2 mins and min of 2 max, when I think we really wanted the min of 2 mins and the max of 2 maxes. If you can reproduce this, I would use gdb or add debug prints to confirm this, and fix the real bug, which would let the service keep working (even though it won't work just right, since the nav map and the octomap aren't agreeing much)

Copy link
Contributor

@c-andy-martin c-andy-martin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @12tbuchman and @KendallRanConley)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants