Tag cache which uses a family checker to save/load particular sets. More...
#include <FamilyTagCache.h>
Classes | |
struct | CachedSet |
Public Attributes | |
FamilyUtilityCheckerPtr | _checker |
std::map< size_t, CachedSet > | _cached_sets |
Tag cache which uses a family checker to save/load particular sets.
The tag cache is constructed outside LEMUR, and provided by pointer via its LEMUR::_tag_cache public member.
The outside code should configure it by providing a pointer to the ompl_lemur::FamilyUtilityChecker object which maintains tags for the state space. It can then call FamilyTagCache::addCachedSet() to load particular cache files.
LEMUR will call the tag cache instance's load() and save() methods during planning, or when requested (e.g. via a call to its LEMUR::saveTagCache() method). Since the number of tags managed by the underlying checker will grow during the planning episode, each call to loadBegin() or saveBegin() will resize the appropriate load_valid, load_invalid, and save maps (with 0 values). Then, during the actual load of individual vertices/edges, the correct transitions will be calculated on-demand (and potentially new tags will be created).
This will also create associated tags in the underlying checker.
This may throw on addCachedSet (e.g. if the set was not found).
On a load/save file error, this class will log the error and then ignore it.