open-rmf / rmf_site

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

Use State::overwrite_set and log errors #174

Closed mxgrey closed 1 year ago

mxgrey commented 1 year ago

When trying to launch a site directly from the command line, a race condition was causing a state to not change correctly. An easy fix for this is to always use overwrite_set instead of simply set for changing states. We don't make use of the queuing or stacking features of states so overwrite_set is what we should've been using in the first place.

This PR also adds logging for all the state change errors in case a different problem appears in the future.