esp::physics::ArticulatedObjectManager class

Class template defining responsibilities and functionality shared for managing all esp::physics::ManagedArticulatedObject wrappers.

Base classes

template<class T>
class PhysicsObjectBaseManager<ManagedArticulatedObject>
Class template defining responsibilities and functionality for managineg object wrappers specializing esp::physics::AbstractManagedPhysicsObject template.

Constructors, destructors, conversion operators

ArticulatedObjectManager() explicit

Public functions

auto addArticulatedObjectFromURDF(const std::string& filepath, bool fixedBase = false, float globalScale = 1.0, float massScale = 1.0, bool forceReload = false, bool maintainLinkOrder = false, bool intertiaFromURDF = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Load, parse, and import a URDF file instantiating an BulletArticulatedObject in the world. This version does not require drawables to be specified.
auto addBulletArticulatedObjectFromURDF(const std::string& filepath, bool fixedBase = false, float globalScale = 1.0, float massScale = 1.0, bool forceReload = false, bool maintainLinkOrder = false, bool intertiaFromURDF = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Cast to BulletArticulatedObject version. Load, parse, and import a URDF file instantiating an BulletArticulatedObject in the world. This version does not require drawables to be specified.
auto addArticulatedObjectByHandle(const std::string& attributesHandle, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesHandle .
auto addBulletArticulatedObjectByHandle(const std::string& attributesHandle, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Cast to BulletArticulatedObject version. Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesHandle .
auto addArticulatedObjectByID(int attributesID, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesID .
auto addBulletArticulatedObjectByID(int attributesID, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY) -> std::shared_ptr<ManagedArticulatedObject>
Cast to BulletArticulatedObject version. Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesID .
auto copyArticulatedObjectByID(int aObjectID) -> std::shared_ptr<ManagedArticulatedObject>
Duplicate an existing ArticulatedObject referenced by the given aObjectID .
auto copyBulletArticulatedObjectByID(int aObjectID) -> std::shared_ptr<ManagedArticulatedObject>
Cast to BulletArticulatedObject version. Duplicate an existing ArticulatedObject referenced by the given aObjectID .

Protected functions

void deleteObjectInternalFinalize(int objectID, const std::string& objectHandle) override
This method will remove articulated objects from physics manager. The wrapper has already been removed by the time this method is called (this is called from esp::core::managedContainers::ManagedContainerBase::deleteObjectInternal)

Function documentation

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addArticulatedObjectFromURDF(const std::string& filepath, bool fixedBase = false, float globalScale = 1.0, float massScale = 1.0, bool forceReload = false, bool maintainLinkOrder = false, bool intertiaFromURDF = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Load, parse, and import a URDF file instantiating an BulletArticulatedObject in the world. This version does not require drawables to be specified.

Parameters
filepath The fully-qualified filename for the URDF file describing the model the articulated object is to be built from.
fixedBase Whether the base of the ArticulatedObject should be fixed.
globalScale A scale multiplier to be applied uniformly in 3 dimensions to the entire ArticulatedObject.
massScale A scale multiplier to be applied to the mass of the all the components of the ArticulatedObject.
forceReload If true, reload the source URDF from file, replacing the cached model.
maintainLinkOrder If true, maintain the order of link definitions from the URDF file as the link indices.
intertiaFromURDF If true, load the link inertia matrices from the URDF file instead of computing automatically from collision shapes.
lightSetup The string name of the desired lighting setup to use.
Returns A reference to the created ArticulatedObject

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addBulletArticulatedObjectFromURDF(const std::string& filepath, bool fixedBase = false, float globalScale = 1.0, float massScale = 1.0, bool forceReload = false, bool maintainLinkOrder = false, bool intertiaFromURDF = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Cast to BulletArticulatedObject version. Load, parse, and import a URDF file instantiating an BulletArticulatedObject in the world. This version does not require drawables to be specified.

Parameters
filepath The fully-qualified filename for the URDF file describing the model the articulated object is to be built from.
fixedBase Whether the base of the ArticulatedObject should be fixed.
globalScale A scale multiplier to be applied uniformly in 3 dimensions to the entire ArticulatedObject.
massScale A scale multiplier to be applied to the mass of the all the components of the ArticulatedObject.
forceReload If true, reload the source URDF from file, replacing the cached model.
maintainLinkOrder If true, maintain the order of link definitions from the URDF file as the link indices.
intertiaFromURDF If true, load the link inertia matrices from the URDF file instead of computing automatically from collision shapes.
lightSetup The string name of the desired lighting setup to use.
Returns A reference to the created ArticulatedObject

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addArticulatedObjectByHandle(const std::string& attributesHandle, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesHandle .

Parameters
attributesHandle The handle of the ArticulatedObjectAttributes to use to create the desired ArticulatedObject
forceReload If true, reload the source URDF from file, replacing the cached model.
lightSetup The string name of the desired lighting setup to use.
Returns The instanced ArticulatedObject 's ID, mapping to the articulated object in PhysicsManager::existingObjects_ if successful, or esp::ID_UNDEFINED. These values come from the same pool used by rigid objects.

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addBulletArticulatedObjectByHandle(const std::string& attributesHandle, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Cast to BulletArticulatedObject version. Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesHandle .

Parameters
attributesHandle The handle of the ArticulatedObjectAttributes to use to create the desired ArticulatedObject
forceReload If true, reload the source URDF from file, replacing the cached model.
lightSetup The string name of the desired lighting setup to use.
Returns The instanced ArticulatedObject 's ID, mapping to the articulated object in PhysicsManager::existingObjects_ if successful, or esp::ID_UNDEFINED. These values come from the same pool used by rigid objects.

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addArticulatedObjectByID(int attributesID, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesID .

Parameters
attributesID The ID of the ArticulatedObjectAttributes to use to create the desired ArticulatedObject
forceReload If true, reload the source URDF from file, replacing the cached model.
lightSetup The string name of the desired lighting setup to use.
Returns The instanced ArticulatedObject 's ID, mapping to the articulated object in PhysicsManager::existingObjects_ if successful, or esp::ID_UNDEFINED. These values come from the same pool used by rigid objects.

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::addBulletArticulatedObjectByID(int attributesID, bool forceReload = false, const std::string& lightSetup = DEFAULT_LIGHTING_KEY)

Cast to BulletArticulatedObject version. Instance an ArticulatedObject from an esp::metadata::attributes::ArticulatedObjectAttributes retrieved from the esp::metadata::managers::AOAttributesManager by the given attributesID .

Parameters
attributesID The ID of the ArticulatedObjectAttributes to use to create the desired ArticulatedObject
forceReload If true, reload the source URDF from file, replacing the cached model.
lightSetup The string name of the desired lighting setup to use.
Returns The instanced ArticulatedObject 's ID, mapping to the articulated object in PhysicsManager::existingObjects_ if successful, or esp::ID_UNDEFINED. These values come from the same pool used by rigid objects.

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::copyArticulatedObjectByID(int aObjectID)

Duplicate an existing ArticulatedObject referenced by the given aObjectID .

Parameters
aObjectID The ID of the ArticulatedObject to duplicate
Returns A shared pointer to the instanced ArticulatedObject 's wrapper .

std::shared_ptr<ManagedArticulatedObject> esp::physics::ArticulatedObjectManager::copyBulletArticulatedObjectByID(int aObjectID)

Cast to BulletArticulatedObject version. Duplicate an existing ArticulatedObject referenced by the given aObjectID .

Parameters
aObjectID The ID of the ArticulatedObject to duplicate
Returns A shared pointer to the instanced ArticulatedObject .

void esp::physics::ArticulatedObjectManager::deleteObjectInternalFinalize(int objectID, const std::string& objectHandle) override protected

This method will remove articulated objects from physics manager. The wrapper has already been removed by the time this method is called (this is called from esp::core::managedContainers::ManagedContainerBase::deleteObjectInternal)

Parameters
objectID the ID of the managed object to remove
objectHandle the string key of the managed object to remove.