Go to the documentation of this file.
   37   : env_(std::move(env)), cache_size_(cache_size)
 
   62   std::unique_ptr<Environment> t = std::move(
cache_.back());
 
   64   t->setState(current_state.
joints);
 
   73   std::unique_ptr<Environment> env;
 
   74   auto lock_read = 
env_->lockRead();
 
   75   int rev = 
env_->getRevision();
 
   86       cache_.push_back(env->clone());
 
   88   else if (
cache_.size() <= 2)
 
  
std::shared_ptr< const Environment > env_
The tesseract_object used to create the cache.
 
long getCacheSize() const override final
Get the cache size used to hold tesseract objects for motion planning.
 
DefaultEnvironmentCache(std::shared_ptr< const Environment > env, std::size_t cache_size=5)
 
void refreshCache() const override final
If the environment has changed it will rebuild the cache of tesseract objects.
 
std::unordered_map< std::string, double > joints
 
void refreshCacheHelper() const
This does not take a lock.
 
std::size_t cache_size_
The assigned cache size.
 
std::deque< std::unique_ptr< Environment > > cache_
A vector of cached Tesseract objects.
 
int cache_env_revision_
The environment revision number at the time the cache was populated.
 
std::unique_ptr< Environment > getCachedEnvironment() const override final
This will pop an Environment object from the queue.
 
void setCacheSize(long size) override final
Set the cache size used to hold tesseract objects for motion planning.
 
std::shared_mutex cache_mutex_
The mutex used when reading and writing to cache_.