Encapsulates constructive mapping of SDF elements to a complete prefab with entities and components. More...
#include <URDFPrefabMaker.h>
Public Types | |
using | CreatePrefabTemplateResult = AZ::Outcome< AzToolsFramework::Prefab::TemplateId, AZStd::string > |
Public Member Functions | |
URDFPrefabMaker (const AZStd::string &modelFilePath, const sdf::Root *root, AZStd::string prefabPath, const AZStd::shared_ptr< Utils::UrdfAssetMap > sdfAssetsMapping, bool useArticulations=false, AZStd::optional< AZ::Transform > spawnPosition=AZStd::nullopt) | |
CreatePrefabTemplateResult | CreatePrefabFromUrdfOrSdf () |
CreatePrefabTemplateResult | CreatePrefabTemplateFromUrdfOrSdf () |
const AZStd::string & | GetPrefabPath () const |
AZStd::string | GetStatus () |
Encapsulates constructive mapping of SDF elements to a complete prefab with entities and components.
using ROS2::URDFPrefabMaker::CreatePrefabTemplateResult = AZ::Outcome<AzToolsFramework::Prefab::TemplateId, AZStd::string> |
On prefab creation this will contain a prefab template id when successful, and an error string on failure.
ROS2::URDFPrefabMaker::URDFPrefabMaker | ( | const AZStd::string & | modelFilePath, |
const sdf::Root * | root, | ||
AZStd::string | prefabPath, | ||
const AZStd::shared_ptr< Utils::UrdfAssetMap > | sdfAssetsMapping, | ||
bool | useArticulations = false , |
||
AZStd::optional< AZ::Transform > | spawnPosition = AZStd::nullopt |
||
) |
Construct PrefabMaker from arguments.
modelFilePath | path to the source URDF/SDF model or world. |
root | parsed SDF root object. |
prefabPath | path to the prefab which will be created as a result of import. |
urdfAssetsMapping | prepared mapping of SDF meshes to Assets. |
useArticulations | allows sdfImporter to create PhysXArticulations instead of multiple rigid bodies and joints. |
CreatePrefabTemplateResult ROS2::URDFPrefabMaker::CreatePrefabFromUrdfOrSdf | ( | ) |
Create and return a prefab template corresponding to the SDF model as set through the constructor. This will also instantiate the prefab template into the level.
CreatePrefabTemplateResult ROS2::URDFPrefabMaker::CreatePrefabTemplateFromUrdfOrSdf | ( | ) |
Create and return a prefab template id corresponding to the URDF/SDF model/world set in the constructor.
const AZStd::string & ROS2::URDFPrefabMaker::GetPrefabPath | ( | ) | const |
Get path to the prefab resulting from the import.
AZStd::string ROS2::URDFPrefabMaker::GetStatus | ( | ) |
Get descriptive status of import. A string with the status, which can be understood by the user.