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

Unexpected Behavior with clear_foreign_voxels: true After Map Loading #77

Open
KuangHaofei opened this issue Dec 20, 2024 · 1 comment

Comments

@KuangHaofei
Copy link

Hi @Schmluk,

Thanks for your great work!

When I applied your method in my scenario, I enabled clear_foreign_voxels: true due to segmentation errors in some complex scenes. This setting helped remove many outliers from the mesh, as shown in this example (see attached image for details, it generate a clean wall where most of the spurious voxels are cleared):
Screenshot from 2024-12-20 10-40-20

However, after saving and then loading the .panmap file, the outliers reappeared in the mesh (see the attached image).

Screenshot from 2024-12-20 10-42-38

Upon reviewing the code, I noticed the following:

  1. When clear_foreign_voxels: true, only the mesh generation process removes outliers based on the class layer. Other layers, such as the TSDF layers, remain unchanged. This can be observed in this part of the code:
    Relevant code snippet

  2. During a subsequent run, when loading the saved map, the previously initialized class layer seems to be ignored in the mesh generation process, as seen here:
    Relevant code snippet

As a result, the mesh still contains outliers after loading the map.

To address this issue, I have two questions:

  1. How can I update the other layers (e.g., TSDF layer or TSDF blocks) when outliers are removed using the clear_foreign_voxels option?
  2. How can I ensure the initialized class layer is used during mesh generation after loading the map?

If there are alternative approaches or recommendations, I’d be happy to hear your suggestions.

Thanks in advance for your help!

@Schmluk
Copy link
Collaborator

Schmluk commented Dec 29, 2024

Hi @KuangHaofei ,

I'm not sure if the class layer is being serialized and saved currently. If it is the code snippet you showed should be able to load the layer and apply it as you usually would.

  1. You can change how data is integrated into all layers in the projective integrator. Another option (that might already be there, but maybe is not configured) is to apply the classlayer, which has the same effect but bakes the clearing into the TSDF. You could run this prior to saving to get the desired effect.

  2. If the class layer is currently not being serialized/you can implement a serialization as in voxblox. Once the class layer is there after loading it should automatically be used as usual.

Hope this helps!

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

No branches or pull requests

2 participants