|
Aikido
|
Instantiation of AssetDatabase that reads of JSON file containing the information that maps object keys to visual assets and resources. More...
#include <aikido/perception/AssetDatabase.hpp>
Public Member Functions | |
| AssetDatabase (const dart::common::ResourceRetrieverPtr &resourceRetriever, const dart::common::Uri &configDataURI) | |
Construct a AssetDatabase that uses ResourceRetriever to load configuration data from a JSON file at URI configDataURI. More... | |
| virtual | ~AssetDatabase ()=default |
| void | getAssetByKey (const std::string &assetKey, dart::common::Uri &assetResource, Eigen::Isometry3d &assetOffset) const |
| Get the object name, resource, and offset from database by objectKey. More... | |
Private Attributes | |
| YAML::Node | mAssetData |
| The map of asset keys to object names and resources for models. More... | |
Instantiation of AssetDatabase that reads of JSON file containing the information that maps object keys to visual assets and resources.
The JSON file should have a map with object keys. Each such key points to a nested map, where the keys are 'resource' and 'name'. The values for each of the nested keys for a particular object key are to be returned to the calling method via the callback.
Here is an example entry in a JSON file:
| aikido::perception::AssetDatabase::AssetDatabase | ( | const dart::common::ResourceRetrieverPtr & | resourceRetriever, |
| const dart::common::Uri & | configDataURI | ||
| ) |
Construct a AssetDatabase that uses ResourceRetriever to load configuration data from a JSON file at URI configDataURI.
| [in] | resourceRetriever | The pointer to obtain the configuration file |
| [in] | configDataURI | The URI for the configuration information file |
|
virtualdefault |
| void aikido::perception::AssetDatabase::getAssetByKey | ( | const std::string & | assetKey, |
| dart::common::Uri & | assetResource, | ||
| Eigen::Isometry3d & | assetOffset | ||
| ) | const |
Get the object name, resource, and offset from database by objectKey.
| [in] | assetKey | The key (string) of an object in AssetDatabase |
| [out] | assetResource | The retrieved uri of the object |
| [out] | assetOffset | The retrieved offset matrix of the object e.g. the offset between a tag and the actual origin of an object |
|
private |
The map of asset keys to object names and resources for models.