-
Notifications
You must be signed in to change notification settings - Fork 658
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
How to use sensor model parameters? #126
Comments
The probability for a hit must be larger than 0.5, otherwise a hit has a negative effect on occupancy. In OctoMap, anything that has been seen at least once is considered either occupied or free. If you want to maintain an "unknown" state in between you could try changing occupancyThres or work directly with the probabilities / logOdds and interpret them in your application. By the way, Q&A are better suited for the mailing list in my opinion. |
Thank you for your explanation. I think I understood the probabilities and the update model now. However I am still puzzled with the results. I did some more investigation regarding the occupancy probability. All cells are either at the clamping min or clamping max (0.1 or 0.9 in my example), even after adding only a single scan to the map. I used the following parameters, which as far as I understood should make the cells converge very slowly towards the thresholds: |
I verified that I am using version 1.7.2 of octomap. I tried to switch to version 1.8.0 (current master) and devel, but with these versions no octomap is build at all, e.g. iterating over all leafs using
Normal would be ca. 5000 nodes after adding one scan to the octree. |
That's weird, do you have some minimal code to reproduce? The parameters you described before should usually work as you intended. |
Update: Regarding the issue with the 1.8 version I constructed a minimal example that reproduces the error for me. Because I'm building with C++11 I had to cherrypick this in 1.7 and master.
The pointcloud and the results for 1.7 and 1.8 version are attached: octomap.tar.gz |
Yeah, that was broken quite some time ago, and writeBinaryConst() was the best way to mitigate it at that moment. Running your test with 1.8 gives me exactly the correct binary file you provided ( Are the unit tests running fine in your installation ( |
I just rebuild completely with a clean checkout of devel-branch with the same result as before. The tests are running successfully. Are you using C++11? Not sure if this might be an issue. |
I just enabled C++11, no difference: The file is still working |
I tried to remove PCL from the example to create a better reproduceable setup. I saved the pointcloud with octomap::Pointcloud::writeBinary() and tried to read it in with octomap::Pointcloud::readBinary() in the minimal example, but then the pointcloud is obviously corrupted, all coordinates are 0, 2, -2, -inf or inf. Is there a way to check the written binary file, e.g. load it with octovis? |
I think there is a (unrelated?) bug in writing point cloud data. The way to test with octovis is to write a ScanGraph to file, the .graph files can be read and visualized in octovis. Although with the bug in writing point cloud data the written files will also be corrupt. Does it work with the graph-files provided at the homepage? |
Pointcloud and ScanGraph binary writing is now fixed (#131). Maybe it's a similar problem? |
I have a question regarding the sensor model used to update the Octomap from point clouds. My goal is to not trust single measurements to much, so that a couple of "hits" are required before a cell in the Occupancy-Grid changes to be occupied. (So basically an outlier rejection.) What would be the right way to do so? I used "setProbHit" to set a lower value, but that doesn't seem to work. (still every measurement results in an occupied cell) But when I set probHit lower then occupancyThres, no cell ever becomes occupied. Is this the intended behaviour?
The text was updated successfully, but these errors were encountered: