Utilities [omni.isaac.utils]
The surface gripper extension provides an interface to the utilities package to be used with omni.isaac.dynamic_control
.
Math Utils
This submodule provides math bindings for vector operations, and other facilitators such as lerp functions.
- add(arg0: carb._carb.Float3, arg1: carb._carb.Float3) carb._carb.Float3
- Parameters
arg0 (
carb.Float3
) – 3D vectorarg1 (
carb.Float3
) – 3D vector
- Returns
arg0 + arg1
.- Return type
carb.Float3
- cross(arg0: carb._carb.Float3, arg1: carb._carb.Float3) carb._carb.Float3
Performs Cross product between 3D vectors :param arg0: 3D vector :type arg0:
carb.Float3
:param arg1: 3D vector :type arg1:carb.Float3
- Returns
cross poduct
arg0 x arg1
.- Return type
carb.Float3
- dot(*args, **kwargs)
Overloaded function.
dot(arg0: carb._carb.Float3, arg1: carb._carb.Float3) -> float
- Performs Dot product between 3D vectors
- Args:
arg0 (
carb.Float3
): 3D vectorarg1 (
carb.Float3
): 3D vector
Returns:
carb.Float3
: dot poductarg0 * arg1
.
dot(arg0: carb._carb.Float4, arg1: carb._carb.Float4) -> float
- Performs Dot product between 4D vectors
- Args:
arg0 (
carb.Float4
): 4D vectorarg1 (
carb.Float4
): 4D vector
Returns:
carb.Float4
: dot poductarg0 * arg1
.
- get_basis_vector_x(arg0: carb._carb.Float4) carb._carb.Float3
Gets Basis vector X of quaternion
- Parameters
arg0 (
carb.Float4
) – Quaternion- Returns
Basis Vector X
- Return type
carb.Float3
- get_basis_vector_y(arg0: carb._carb.Float4) carb._carb.Float3
Gets Basis vector Y of quaternion
- Parameters
arg0 (
carb.Float4
) – Quaternion- Returns
Basis Vector Y
- Return type
carb.Float3
- get_basis_vector_z(arg0: carb._carb.Float4) carb._carb.Float3
Gets Basis vector Z of quaternion
- Parameters
arg0 (
carb.Float4
) – Quaternion- Returns
Basis Vector Z
- Return type
carb.Float3
- inverse(*args, **kwargs)
Overloaded function.
inverse(arg0: carb._carb.Float4) -> carb._carb.Float4
- Gets Inverse Quaternion
Args:
arg0 (
carb.Float4
): quaternionReturns:
carb.Float4
: The inverse quaternion
inverse(arg0: omni::isaac::dynamic_control::DcTransform) -> omni::isaac::dynamic_control::DcTransform
- Gets Inverse Transform
Args:
arg0 (
omni.isaac.dynamic_control._dynamic_control.Transform
): TransformReturns:
omni.isaac.dynamic_control._dynamic_control.Transform
: The inverse Inverse Transform
- lerp(*args, **kwargs)
Overloaded function.
lerp(arg0: carb._carb.Float3, arg1: carb._carb.Float3, arg2: float) -> carb._carb.Float3
Performs Linear interpolation between points arg0 and arg1
Args:
arg0 (
carb.Float3
): Pointarg1 (
carb.Float3
): Pointarg2 (
float
): distance from 0 to 1, where 0 is closest to arg0, and 1 is closest to arg1Returns:
carb.Float3
: Interpolated pointlerp(arg0: carb._carb.Float4, arg1: carb._carb.Float4, arg2: float) -> carb._carb.Float4
Performs Linear interpolation between quaternions arg0 and arg1
Args:
arg0 (
carb.Float4
): Quaternionarg1 (
carb.Float4
): Quaternionarg2 (
float
): distance from 0 to 1, where 0 is closest to arg0, and 1 is closest to arg1Returns:
carb.Float4
: Interpolated quaternionlerp(arg0: omni::isaac::dynamic_control::DcTransform, arg1: omni::isaac::dynamic_control::DcTransform, arg2: float) -> omni::isaac::dynamic_control::DcTransform
Performs Linear interpolation between points arg0 and arg1
Args:
arg0 (
omni.isaac.dynamic_control._dynamic_control.Transform
): Transformarg1 (
omni.isaac.dynamic_control._dynamic_control.Transform
): Transformarg2 (
float
): distance from 0 to 1, where 0 is closest to arg0, and 1 is closest to arg1Returns:
omni.isaac.dynamic_control._dynamic_control.Transform
: Interpolated transform
- mul(*args, **kwargs)
Overloaded function.
mul(arg0: carb._carb.Float3, arg1: float) -> carb._carb.Float3
Scales a 3D vector by a given value
- Args:
arg0 (
carb.Float3
): 3D vectorarg1 (
float
): scale factor- Returns:
carb.Float3
: scaled vector.
mul(arg0: carb._carb.Float4, arg1: float) -> carb._carb.Float4
Scales a 4D vector by a given value
- Args:
arg0 (
carb.Float4
): 4D vectorarg1 (
float
): scale factor- Returns:
carb.Float4
: scaled vector.
mul(arg0: carb._carb.Float4, arg1: carb._carb.Float4) -> carb._carb.Float4
Performs a Quaternion rotation between two 4D vectors
- Args:
arg0 (
carb.Float4
): first 4D quaternion vectorarg1 (
carb.Float4
): second 4D quaternion vector- Returns:
carb.Float4
: rotated 4D quaternion vector.
mul(arg0: omni::isaac::dynamic_control::DcTransform, arg1: omni::isaac::dynamic_control::DcTransform) -> omni::isaac::dynamic_control::DcTransform
Performs a Forward Transform multiplication between the transforms
- Args:
arg0 (
omni.isaac.dynamic_control._dynamic_control.Transform
): First Transformarg1 (
omni.isaac.dynamic_control._dynamic_control.Transform
): Second Transform
Returns:
- normalize(*args, **kwargs)
Overloaded function.
normalize(arg0: carb._carb.Float3) -> carb._carb.Float3
Gets normalized 3D vector
Args:
arg0 (
carb.Float3
): 3D VectorReturns:
carb.Float3
: Normalized 3D Vectornormalize(arg0: carb._carb.Float4) -> carb._carb.Float4
Gets normalized 4D vector Args:
arg0 (
carb.Float4
): 4D VectorReturns:
carb.Float4
: Normalized 4D Vector
- rotate(arg0: carb._carb.Float4, arg1: carb._carb.Float3) carb._carb.Float3
rotates the 3D vector arg1 by the quaternion arg0
- Parameters
arg0 (
carb.Float4
) – quaternionarg1 (
carb.Float3
) – 3D Vector
- Returns
Rotated 3D Vector
- Return type
carb.Float3
- slerp(*args, **kwargs)
Overloaded function.
slerp(arg0: carb._carb.Float4, arg1: carb._carb.Float4, arg2: float) -> carb._carb.Float4
Performs Spherical Linear interpolation between quaternions arg0 and arg1
Args:
arg0 (
carb.Float4
): Quaternionarg1 (
carb.Float4
): Quaternionarg2 (
float
): distance from 0 to 1, where 0 is closest to arg0, and 1 is closest to arg1Returns:
carb.Float4
: Interpolated quaternionslerp(arg0: omni::isaac::dynamic_control::DcTransform, arg1: omni::isaac::dynamic_control::DcTransform, arg2: float) -> omni::isaac::dynamic_control::DcTransform
Performs Spherical Linear interpolation between points arg0 and arg1
Args:
arg0 (
omni.isaac.dynamic_control._dynamic_control.Transform
): Transformarg1 (
omni.isaac.dynamic_control._dynamic_control.Transform
): Transformarg2 (
float
): distance from 0 to 1, where 0 is closest to arg0, and 1 is closest to arg1Returns:
omni.isaac.dynamic_control._dynamic_control.Transform
: Interpolated transform
- transform_inv(*args, **kwargs)
Overloaded function.
transform_inv(arg0: omni::isaac::dynamic_control::DcTransform, arg1: omni::isaac::dynamic_control::DcTransform) -> omni::isaac::dynamic_control::DcTransform
Computes local Transform of arg1 with respect to arg0: inv(arg0)*arg1
Args:
arg0 (omni.isaac.dynamic_control._dynamic_control.Transform): origin Transform
arg1 (omni.isaac.dynamic_control._dynamic_control.Transform): Transform
Returns:
omni.isaac.dynamic_control._dynamic_control.Transform
: resulting transform ofinv(arg0)*arg1
transform_inv(arg0: pxrInternal_v0_22__pxrReserved__::GfTransform, arg1: pxrInternal_v0_22__pxrReserved__::GfTransform) -> pxrInternal_v0_22__pxrReserved__::GfTransform
Computes local Transform of arg1 with respect to arg0: inv(arg0)*arg1
Args:
arg0 (pxr.Transform): origin Transform
arg1 (pxr.Transform): Transform
Returns:
oxr.Transform
: resulting transform ofinv(arg0)*arg1
- set_scale(arg0: int, arg1: str, arg2: carb._carb.Float3) None
Set scale for an object in the stage
- Parameters
arg0 (
omni.isaac.dynamic_control._dynamic_control
) – handle to dynamic control apiarg1 (
int
) – Stage IDarg2 (
carb::Float3
) – scale
- set_transform(arg0: int, arg1: str, arg2: carb._carb.Float3, arg3: carb._carb.Float4) None
Set transform for an object in the stage, handles physics objects if simulation is running using dynamic control
- Parameters
arg0 (
omni.isaac.dynamic_control._dynamic_control
) – handle to dynamic control apiarg1 (
int
) – Stage IDarg2 (
carb::Float4
) – translationarg2 – rotation
Commands
- class IsaacSimDestroyPrim(prim_path: str)
Bases:
omni.kit.commands.command.Command
Command to set a delete a prim. This variant has less overhead than other commands as it doesn’t store an undo operation
Typical usage example:
omni.kit.commands.execute( "IsaacSimDestroyPrim", prim_path="/World/Prim, )
- class IsaacSimScalePrim(prim_path: str, scale: carb._carb.Float3 = (0, 0, 0))
Bases:
omni.kit.commands.command.Command
Command to set a scale of a prim
Typical usage example:
omni.kit.commands.execute( "IsaacSimScalePrim", prim_path="/World/Prim, scale=(1.5, 1.5, 1.5), )
- class IsaacSimSpawnPrim(usd_path: str, prim_path: str, translation: carb._carb.Float3 = (0, 0, 0), rotation: carb._carb.Float4 = (0, 0, 0, 1))
Bases:
omni.kit.commands.command.Command
Command to spawn a new prim in the stage and set its transform. This uses dynamic_control to properly handle physics objects and articulation
Typical usage example:
omni.kit.commands.execute( "IsaacSimSpawnPrim", usd_path="/path/to/file.usd", prim_path="/World/Prim, translation=(0, 0, 0), rotation=(0, 0, 0, 1), )
- class IsaacSimTeleportPrim(prim_path: str, translation: carb._carb.Float3 = (0, 0, 0), rotation: carb._carb.Float4 = (0, 0, 0, 1))
Bases:
omni.kit.commands.command.Command
Command to set a transform of a prim. This uses dynamic_control to properly handle physics objects and articulation
Typical usage example:
omni.kit.commands.execute( "IsaacSimTeleportPrim", prim_path="/World/Prim, translation=(0, 0, 0), rotation=(0, 0, 0, 1), )