LEMUR Packages: ompl_lemur or_lemur pr_bgl prpy_lemur
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Groups Pages
Classes | Public Member Functions | Public Attributes | List of all members
ompl_lemur::FamilyTagCache< VTagMap, ETagMap > Class Template Reference

Tag cache which uses a family checker to save/load particular sets. More...

#include <FamilyTagCache.h>

Inheritance diagram for ompl_lemur::FamilyTagCache< VTagMap, ETagMap >:
ompl_lemur::TagCache< VTagMap, ETagMap >

Classes

struct  CachedSet
 

Public Member Functions

 FamilyTagCache (FamilyUtilityCheckerPtr checker)
 
void addCachedSet (std::string set_name, std::string cache_filename, std::string header)
 
bool hasChanged ()
 
void loadBegin ()
 
void loadBatch (size_t batch, VTagMap v_tag_map, size_t v_from, size_t v_to, ETagMap e_tag_map, size_t e_from, size_t e_to)
 
void loadEnd ()
 
void saveBegin ()
 
void saveBatch (size_t batch, VTagMap v_tag_map, size_t v_from, size_t v_to, ETagMap e_tag_map, size_t e_from, size_t e_to)
 
void saveEnd ()
 

Public Attributes

FamilyUtilityCheckerPtr _checker
 
std::map< size_t, CachedSet_cached_sets
 

Detailed Description

template<class VTagMap, class ETagMap>
class ompl_lemur::FamilyTagCache< VTagMap, ETagMap >

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.


The documentation for this class was generated from the following file: