getRelativeTransform#
Fully qualified name: isaacsim::core::includes::pose::getRelativeTransform
- inline usdrt::GfMatrix4d isaacsim::core::includes::pose::getRelativeTransform(
- pxr::UsdStageRefPtr usdStage,
- usdrt::UsdStageRefPtr usdrtStage,
- const pxr::SdfPath &sourcePrim,
- const pxr::SdfPath &targetPrim,
Computes the relative transform matrix between two prims.
Calculates the transform that converts coordinates from the source prim’s frame to the target prim’s frame. The computation follows these steps:
Compute world transforms for both source and target prims
Invert the target’s world transform
Multiply to get the relative transform
Note
The returned matrix is in column-major format
Warning
Ensure both prims exist in the stage before calling
- Parameters:
usdStage – [in] Reference to the USD stage
usdrtStage – [in] Reference to the USDRT stage
sourcePrim – [in] Path to the source prim
targetPrim – [in] Path to the target prim
- Returns:
usdrt::GfMatrix4d The relative transform matrix (column-major)