tesseract
tesseract copied to clipboard
Octomap segfault
There appears to be a bug in the octomap library that causes a segfault for various cases.
tesseract_examples_basic_cartesian_example: /build/octomap-KdBKXz/octomap-1.9.3+dfsg/octomap/include/octomap/OcTreeDataNode.hxx:69: octomap::OcTreeDataNode<T>::~OcTreeDataNode() [with T = float]: Assertion `children == NULL' failed.
There is a PR that addresses this issue, but it hasn't been merged yet.
We might be able to add the same fixes to our code to fix this issue per discussion here
Per @Levi-Armstrong
I tried to add the following in the prune function, but children is not accessible.
if (node->children != NULL){ delete[] node->children; node->children = NULL; }
I am starting to think there may be an issue with it finding different version of the library. The system installs version 1.9.3 and ros noetic has its own version of 1.9.8. If you run ldd on the example library and executable which is creating the error do you only see it linked against one version?
I am starting to think there may be an issue with it finding different version of the library.
This is for sure caused by using the system version of liboctomap-dev
rather than the one provided by the ROS build farm. I suppose there is a patch somewhere between 1.9.3 and 1.9.8 that resolves this issue
@Levi-Armstrong how do you feel about adding the appropriate version of octomap
to the dependencies.rosinstall
? It's not ideal, but I can't find any later versions distributed on PPAs, etc. It also looks like jammy only provides version 1.9.7, which may also not solve the issue
I think adding it to the rosinstall is fine. Should we also add it to the CMake find_package for octomap also?
I suppose there is a patch somewhere between 1.9.3 and 1.9.8 that resolves this issue
I forgot there is an open PR against octomap that fixes this, so it seems like 1.9.8 may only coincidentally fix this issue
I think adding it to the rosinstall is fine. Should we also add it to the CMake find_package for octomap also?
That might be a good idea, but it does technically compile with 1.9.x, so that restriction seems like it could be a bit overly conservative. I'm not sure if this problem always occurs with octomaps or just in this specific unit test
If this occurs on you machine you might run ldd and see if it is linking against both libraries which can cause weird behaviors like this.
It looks like it only links against the system version