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

Fix crash when level has no floors #370

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Conversation

luca-della-vedova
Copy link
Member

Bug fix

Fixed bug

Closes #369, building_map crashing when there is no floor because of a FileNotFound error.

Fix applied

When there is no floor, the floor generation function will be called and the script will go straight into wall generation. The issue was that the meshes folder might not have been created, it is done here, however the generate_wall_visual_mesh function is called after the add_pbr_material which assumes that the folder exists.
The quick fix is to add a check in the copy_texture function (called by add_pbr_material) for directory existence, and create it if it is not found.

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Copy link
Contributor

@codebot codebot left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! 🙇

@luca-della-vedova luca-della-vedova merged commit 7d89d7f into main Jul 23, 2021
@luca-della-vedova luca-della-vedova deleted the fix/no_floor_crash branch July 23, 2021 05:23
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.

building map generator crashes when worlds have no floor
2 participants