![]() |
Tesseract 0.28.4
|

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 (std::shared_ptr< const Environment > 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. | |
| long | getCacheSize () const override final |
| Get the cache size used to hold tesseract objects for motion planning. | |
| void | refreshCache () const override final |
| If the environment has changed it will rebuild the cache of tesseract objects. | |
| std::unique_ptr< Environment > | getCachedEnvironment () const override final |
| This will pop an Environment object from the queue. | |
| Public Member Functions inherited from tesseract::environment::EnvironmentCache | |
| EnvironmentCache (const EnvironmentCache &)=delete | |
| EnvironmentCache & | operator= (const EnvironmentCache &)=delete |
| EnvironmentCache (EnvironmentCache &&)=delete | |
| EnvironmentCache & | operator= (EnvironmentCache &&)=delete |
Protected Member Functions | |
| void | refreshCacheHelper () const |
| This does not take a lock. | |
Protected Attributes | |
| std::shared_ptr< const Environment > | env_ |
| The tesseract_object used to create the cache. | |
| std::size_t | cache_size_ { 5 } |
| The assigned cache size. | |
| int | cache_env_revision_ { 0 } |
| The environment revision number at the time the cache was populated. | |
| std::deque< std::unique_ptr< Environment > > | cache_ |
| A vector of cached Tesseract objects. | |
| std::shared_mutex | cache_mutex_ |
| The mutex used when reading and writing to cache_. | |
|
finaloverridevirtual |
Set the cache size used to hold tesseract objects for motion planning.
| size | The size of the cache. |
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.
|
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.