open-rmf / rmf_site

Experimental visualizer for dense buildings in RMF
32 stars 13 forks source link

Fix assigning site IDs to new lanes in lifts #226

Closed luca-della-vedova closed 2 months ago

luca-della-vedova commented 3 months ago

Bug fix

Fixed bug

Fixes #224

Fix applied

The function to assign site IDs to new entities was not being called for anchors that were children of lifts, hence the subsequent query to save the site would not find the anchor (its ID would be missing). The fix is to make sure we assign a site ID to anchors that are children of the lift cabin.

To test:

Without this PR you should get this error:

ERROR librmf_site_editor::site::save: Unable to compile site: an object has a reference to an anchor that does not exist

With this PR it should save successfully.