grid_map icon indicating copy to clipboard operation
grid_map copied to clipboard

Crashing with normal filter

Open fmascarich opened this issue 6 years ago • 1 comments

I'm running the elevation mapping package with a picoflexx monstar and I'm moving onto playing with the gridMapFilters/NormalVectorsFilter.

The filter node crashes in the computeWithArea function of the NormalVectorsFilter.cpp. Specifically, I get :

Error in /home/XXXXXX/lib/grid_map_demos/filters_demo': realloc(): invalid next size: 0x00000000012231e0

Its calculating: const int maxNumberOfCells = pow(ceil(2 * estimationRadius_ / map.getResolution()), 2);

And I've found that when nPoints is greater than maxNumberOfCells, the resize function fails.

My own hacky solution is just to stop adding points when nPoints is >= to maxNumberOfCells, but I don't know what effect this has on the normal calculation.

I'm not sure if there's a problem with some other configuration setting that I've misinterpreted, which is totally possible.

fmascarich avatar Jul 19 '18 03:07 fmascarich

Hi @fmascarich , I had a similar issue and what solved my problem was to increase the radius of the NormalVectorsFilter parameter to something greater than your map resolution (you can get the resolution by rostopic echo /<topic_of_your_grid_map>/info).

I hope this helps, Marco.

marco-tranzatto avatar Jan 15 '19 09:01 marco-tranzatto