Tesseract
Motion Planning Environment
|
#include <environment_cache.h>
Public Types | |
using | Ptr = std::shared_ptr< DefaultEnvironmentCache > |
using | ConstPtr = std::shared_ptr< const DefaultEnvironmentCache > |
Public Types inherited from tesseract_environment::EnvironmentCache | |
using | Ptr = std::shared_ptr< EnvironmentCache > |
using | ConstPtr = std::shared_ptr< const EnvironmentCache > |
using | UPtr = std::unique_ptr< EnvironmentCache > |
using | ConstUPtr = std::unique_ptr< const EnvironmentCache > |
Public Member Functions | |
DefaultEnvironmentCache (Environment::ConstPtr env, std::size_t cache_size=5) | |
void | setCacheSize (long size) override final |
Set the cache size used to hold tesseract objects for motion planning. More... | |
long | getCacheSize () const override final |
Get the cache size used to hold tesseract objects for motion planning. More... | |
void | refreshCache () const override final |
If the environment has changed it will rebuild the cache of tesseract objects. More... | |
Environment::UPtr | getCachedEnvironment () const override final |
This will pop an Environment object from the queue. More... | |
Public Member Functions inherited from tesseract_environment::EnvironmentCache | |
EnvironmentCache ()=default | |
virtual | ~EnvironmentCache ()=default |
EnvironmentCache (const EnvironmentCache &)=delete | |
EnvironmentCache & | operator= (const EnvironmentCache &)=delete |
EnvironmentCache (EnvironmentCache &&)=delete | |
EnvironmentCache & | operator= (EnvironmentCache &&)=delete |
virtual void | setCacheSize (long size)=0 |
Set the cache size used to hold tesseract objects for motion planning. More... | |
virtual long | getCacheSize () const =0 |
Get the cache size used to hold tesseract objects for motion planning. More... | |
virtual void | refreshCache () const =0 |
If the environment has changed it will rebuild the cache of tesseract objects. More... | |
virtual Environment::UPtr | getCachedEnvironment () const =0 |
This will pop an Environment object from the queue. More... | |
Protected Member Functions | |
void | refreshCacheHelper () const |
This does not take a lock. More... | |
Protected Attributes | |
Environment::ConstPtr | env_ |
The tesseract_object used to create the cache. More... | |
std::size_t | cache_size_ { 5 } |
The assigned cache size. More... | |
int | cache_env_revision_ { 0 } |
The environment revision number at the time the cache was populated. More... | |
std::deque< Environment::UPtr > | cache_ |
A vector of cached Tesseract objects. More... | |
std::shared_mutex | cache_mutex_ |
The mutex used when reading and writing to cache_. More... | |
using tesseract_environment::DefaultEnvironmentCache::ConstPtr = std::shared_ptr<const DefaultEnvironmentCache> |
using tesseract_environment::DefaultEnvironmentCache::Ptr = std::shared_ptr<DefaultEnvironmentCache> |
tesseract_environment::DefaultEnvironmentCache::DefaultEnvironmentCache | ( | Environment::ConstPtr | env, |
std::size_t | cache_size = 5 |
||
) |
|
finaloverridevirtual |
This will pop an Environment object from the queue.
This will first call refreshCache to ensure it has an updated tesseract then proceed
Implements tesseract_environment::EnvironmentCache.
|
finaloverridevirtual |
Get the cache size used to hold tesseract objects for motion planning.
Implements tesseract_environment::EnvironmentCache.
|
finaloverridevirtual |
If the environment has changed it will rebuild the cache of tesseract objects.
Implements tesseract_environment::EnvironmentCache.
|
protected |
This does not take a lock.
|
finaloverridevirtual |
Set the cache size used to hold tesseract objects for motion planning.
size | The size of the cache. |
Implements tesseract_environment::EnvironmentCache.
|
mutableprotected |
A vector of cached Tesseract objects.
|
mutableprotected |
The environment revision number at the time the cache was populated.
|
mutableprotected |
The mutex used when reading and writing to cache_.
|
protected |
The assigned cache size.
|
protected |
The tesseract_object used to create the cache.