class
#include <esp/metadata/URDFParser.h>
Model Generic structure representing an articulated object parsed from a URDF file independent from any physics implementation.
Constructors, destructors, conversion operators
- Model() defaulted
Public functions
-
auto m_rootTransformInWorld(Magnum::
Math:: IdentityInitT) -> Magnum:: Matrix4 - world transform of the object root if provided
- void printKinematicChain() const
-
auto getLink(const std::
string& linkName) const -> std:: shared_ptr<Link> - Get a link provided its name.
-
auto getLink(int linkIndex) const -> std::
shared_ptr<Link> - Get a link provided its index.
-
auto getJoint(int linkIndex) const -> std::
shared_ptr<Joint> - Get a parent joint of a link provided the link index.
- void setGlobalScaling(float scaling)
- Set global scaling and re-scale an existing model. Modifies various internal parameters.
- auto getGlobalScaling() const -> float
- Get the currently configured global model scaling.
- void setMassScaling(float massScaling)
- Set scaling for mass from initial values configured in URDF. Modifies various internal parameters.
- auto getMassScaling() const -> float
- Get the currently configured mass scaling of the model.
-
void setRenderAsset(Cr::Containers::Optional<std::
string> renderAsset) - Set the path to the render asset to attach to this URDF model.
-
auto getRenderAsset() const -> Cr::Containers::Optional<std::
string> - Get the path to the render asset to attach to this URDF model.
- void setSemanticId(int semanticId)
- Set the semantic ID of the URDF model.
- auto getSemanticId() const -> int
- Get the semantic ID of this URDF model.
- void setRenderLinkVisualShapes(bool renderLinkVisualShapes)
- Set hint to render articulated object primitives even if a render asset is present.
- auto getRenderLinkVisualShapes() const -> bool
- Get hint to render articulated object visual shapes as defined in the URDF even if a render asset/skin is present.
- void setModelInitAttributes(metadata::attributes::ArticulatedObjectAttributes::ptr artObjAttributes)
- This function will set the metadata::
attributes:: ArticulatedObjectAttributes used to create this model. -
auto getUserConfiguration() const -> std::
shared_ptr<core:: config:: Configuration> - Gets a smart pointer reference to a copy of the user-specified configuration data from a config file. Habitat does not parse or process this data, but it will be available to the user via python bindings for each object.
-
auto getInitializationAttributes() const -> std::
shared_ptr<metadata:: attributes:: ArticulatedObjectAttributes> - Get a copy of the template used to initialize this object.
Public variables
-
std::
string m_name - name of the articulated object or robot
-
std::
string m_sourceFile - source file this model was built from (e.g. the .urdf file)
-
std::
map<std:: string, std:: shared_ptr<Material>> m_materials - map of names to materials
-
std::
map<std:: string, std:: shared_ptr<Link>> m_links - map of names to links
-
std::
map<int, std:: string> m_linkIndicesToNames - map of link indices to names
-
std::
map<std:: string, std:: shared_ptr<Joint>> m_joints - map of names to joints
-
std::
vector<std:: shared_ptr<Link>> m_rootLinks - list of root links (usually 1)
- bool m_overrideFixedBase
Protected functions
- void scaleShape(Shape& shape, float scale)
- Scale the transformation and parameters of a Shape.
Protected variables
- metadata::attributes::ArticulatedObjectAttributes::ptr initializationAttributes_
- Json-based attributes defining characteristics of this model not specified in the source XML/URDF. Primarily to support default user-defined attributes. This data is read in from a json file with the same base name as the source XML/URDF for this model but the extension ".ao_config.json".
- float m_globalScaling
- float m_massScaling
- Mass scaling of the model's Link inertias.
-
Cr::Containers::Optional<std::
string> m_renderAsset - Path to a render asset associated with this articulated object.
- int m_semanticId
- Semantic ID of this model.
- bool m_renderLinkVisualShapes
Function documentation
void esp:: metadata:: URDF:: Model:: printKinematicChain() const
output a string to console listing the link|joint hierarchy of this model for debugging and investigation purposes
std:: shared_ptr<Link> esp:: metadata:: URDF:: Model:: getLink(const std:: string& linkName) const
Get a link provided its name.
Parameters | |
---|---|
linkName | The link's configured name from the URDF file. |
Returns | The link metadata object or nullptr if no link with provided name. |
std:: shared_ptr<Link> esp:: metadata:: URDF:: Model:: getLink(int linkIndex) const
Get a link provided its index.
Parameters | |
---|---|
linkIndex | The link's index. |
Returns | The link metadata object or nullptr if no link with provided index. |
std:: shared_ptr<Joint> esp:: metadata:: URDF:: Model:: getJoint(int linkIndex) const
Get a parent joint of a link provided the link index.
Parameters | |
---|---|
linkIndex | The link's index. |
Returns | The parent joint metadata object or nullptr if no link with provided index. |
void esp:: metadata:: URDF:: Model:: setGlobalScaling(float scaling)
Set global scaling and re-scale an existing model. Modifies various internal parameters.
Parameters | |
---|---|
scaling | The new absolute uniform scale. |
void esp:: metadata:: URDF:: Model:: setMassScaling(float massScaling)
Set scaling for mass from initial values configured in URDF. Modifies various internal parameters.
Parameters | |
---|---|
massScaling | The new absolute uniform mass scale. |
std:: shared_ptr<metadata:: attributes:: ArticulatedObjectAttributes> esp:: metadata:: URDF:: Model:: getInitializationAttributes() const
Get a copy of the template used to initialize this object.
Returns | A copy of the esp:: |
---|
Variable documentation
bool esp:: metadata:: URDF:: Model:: m_overrideFixedBase
if true, force this model to produce a fixed base instance (e.g. the root is not dynamic)
float esp:: metadata:: URDF:: Model:: m_globalScaling protected
Global euclidean scaling applied to the model's transforms, asset scales, and prismatic joint limits. Does not affect mass.
bool esp:: metadata:: URDF:: Model:: m_renderLinkVisualShapes protected
Forces link visual shapes to be rendered even if a render asset(skin) is present.