The only way I can think around around this would be to remove the pre-computed graph in createGraph and create new nodes NodeSE2 on expansion in the main loop so that we can have literal copies in the priority queue of the same node with different metadata.
Or the objects we push into the priority queue aren't the NodeSE2 * itself, but some pared down version of it with only the essential information. Its more memory overhead, but would allow us to keep the master graph but search with different sets of metadata - autwoare does this.
https://github.com/Autoware-AI/core_planning/blob/master/astar_search/src/astar_search.cpp
The only way I can think around around this would be to remove the pre-computed graph in createGraph and create new nodes NodeSE2 on expansion in the main loop so that we can have literal copies in the priority queue of the same node with different metadata.
Or the objects we push into the priority queue aren't the NodeSE2 * itself, but some pared down version of it with only the essential information. Its more memory overhead, but would allow us to keep the master graph but search with different sets of metadata - autwoare does this.