#include <model_loader.h>
|
| bool | create (const tue::config::DataConstPointer &data, const UUID &id_opt, const UUID &parent_id, UpdateRequest &req, std::stringstream &error, const std::string &model_path="", const geo::Pose3D &pose_offset=geo::Pose3D::identity()) |
| | create add entity to update_request from config data. More...
|
| |
| bool | create (const tue::config::DataConstPointer &data, UpdateRequest &req, std::stringstream &error) |
| | create add entity to update_request from config data. "_root" will be used as id. More...
|
| |
| bool | create (const UUID &id, const std::string &type, UpdateRequest &req, std::stringstream &error, const bool allow_sdf=false) |
| | create add entity to update_request with id 'id' of the type 'type'. If allow_sdf is true, also sdf models are considered. Otherwise only ED yaml models are used. More...
|
| |
| bool | createSDF (const tue::config::DataConstPointer &data, const UUID &parent_id, const geo::Pose3D &parent_pose, const UUID &id_override, const boost::shared_ptr< const geo::Pose3D > pose_override, UpdateRequest &req, std::stringstream &error) |
| | createSDF add SDF entity to update_request from config data. More...
|
| |
| bool | exists (const std::string &type) const |
| | exists Check of a model of type 'type' exist More...
|
| |
| | ModelLoader () |
| |
| | ~ModelLoader () |
| |
Definition at line 18 of file model_loader.h.
◆ ModelData
◆ ModelLoader()
| ed::models::ModelLoader::ModelLoader |
( |
| ) |
|
◆ ~ModelLoader()
| ed::models::ModelLoader::~ModelLoader |
( |
| ) |
|
◆ create() [1/3]
create add entity to update_request from config data.
- Parameters
-
| data | should contain the right data and should be at the correct reading point |
| id_opt | Optional id, if no id in data |
| parent_id | prefix to id, unless starting with "_" |
| req | UpdateRequest to 'fill' |
| error | error stream |
| model_path | path where the data is read. Is used for relative paths in the data |
| pose_offset | pose offset, if no pose in data, this pose will be the final pose. |
- Returns
- bool, which indicates succes
Definition at line 329 of file model_loader.cpp.
◆ create() [2/3]
create add entity to update_request from config data. "_root" will be used as id.
- Parameters
-
| data | should contain the right data and should be at the correct reading point |
| req | UpdateRequest to 'fill' |
| error | error stream |
- Returns
- bool, which indicates succes
Definition at line 322 of file model_loader.cpp.
◆ create() [3/3]
create add entity to update_request with id 'id' of the type 'type'. If allow_sdf is true, also sdf models are considered. Otherwise only ED yaml models are used.
- Parameters
-
| id | new id of the entity |
| type | type of the entity |
| req | UpdateRequest to 'fill' |
| error | error stream |
| allow_sdf | Allow SDF models, or only ED yaml models |
- Returns
- bool, which indicates succes
Definition at line 285 of file model_loader.cpp.
◆ createSDF()
createSDF add SDF entity to update_request from config data.
- Parameters
-
| data | should contain the right data and should be at the correct reading point |
| parent_id | prefix to id, unless starting with "_" |
| parent_pose | pose offset which will always be applied |
| id_override | if not empty, this will override the id of the model |
| pose_override | if not empty, this will override the pose of the model |
| req | UpdateRequest to 'fill' |
| error | error stream |
- Returns
- bool, which indicates succes
Definition at line 466 of file model_loader.cpp.
◆ exists()
| bool ed::models::ModelLoader::exists |
( |
const std::string & |
type | ) |
const |
exists Check of a model of type 'type' exist
- Parameters
-
- Returns
- bool, which indicates of type exist
Definition at line 264 of file model_loader.cpp.
◆ getModelPath()
getModelPath get file path of model of type 'type'
ModelLoader::getModelPath.
- Parameters
-
- Returns
- path of the model, empty if model not found
- Parameters
-
- Returns
- The full path or empty string, if not found
Definition at line 90 of file model_loader.cpp.
◆ getSDFPath()
getSDFPath get file path of SDF model with uri 'uri'
- Parameters
-
- Returns
- path of the model, empty if model not found
Definition at line 104 of file model_loader.cpp.
◆ loadModelData()
loadModelData load data of model of type 'type'
- Parameters
-
| type | type of the model |
| types | vector of model types for recursive inheritance |
| error | error stream |
| allow_sdf | Allow SDF models, or only ED yaml models |
- Returns
- DataConstPointer with the data, empty in case of error
Definition at line 156 of file model_loader.cpp.
◆ loadSDFData()
loadSDFData load data of SDF model of uri 'uri'
- Parameters
-
| uri | uri of the model |
| error | error stream |
- Returns
- DataConstPointer with the data, empty in case of error
Definition at line 225 of file model_loader.cpp.
◆ readModelCache()
readModelCache read the model cache, which contains the data and all types
- Parameters
-
| type | type of the model to look for |
- Returns
- ModelData, DataPointer is empty in case type not in cache
Definition at line 143 of file model_loader.cpp.
◆ ed_model_paths_
◆ file_paths_
◆ model_cache_
◆ model_paths_
◆ shape_cache_
The documentation for this class was generated from the following files: