Python guide and API reference#
Simulation#
Manual simulation requires an OVStage native handle and a registered physics engine. Configure both before initialization:
from isaacsim.physics.ovsim.control import simulation
simulation.set_parameter("physics", "ovstage-stage-ptr", stage_handle)
simulation.set_parameter("physics", "physics-engine", "ovphysx")
simulation.initialize()
simulation.step()
simulation.invalidate()
play(), pause(), and stop() are compatibility no-ops; use
initialize(), step(), and invalidate() for manual control.
initialize() -> None |
|
play() -> None |
|
pause() -> None |
|
stop() -> None |
|
step() -> None |
|
invalidate() -> None |
|
str, value: bool | int | int | float | str) -> None |
|
str) -> bool | int | int | float | str |
- isaacsim.physics.ovsim.control.simulation.initialize() None#
Initialize the active physics simulation for manual stepping.
Configure
ovstage-stage-ptrbefore calling this function.- Raises:
RuntimeError – If no OVStage pointer is configured or physics initialization fails.
- isaacsim.physics.ovsim.control.simulation.play() None#
Preserve play-state API compatibility without changing manual simulation state.
- isaacsim.physics.ovsim.control.simulation.pause() None#
Preserve pause-state API compatibility without changing manual simulation state.
- isaacsim.physics.ovsim.control.simulation.stop() None#
Preserve stop-state API compatibility without changing manual simulation state.
- isaacsim.physics.ovsim.control.simulation.step() None#
Advance the manually controlled simulation by one step.
- Raises:
RuntimeError – If the simulation is not initialized.
- isaacsim.physics.ovsim.control.simulation.invalidate() None#
Invalidate the manually stepped simulation state.
- Raises:
RuntimeError – If physics invalidation fails.
- isaacsim.physics.ovsim.control.simulation.set_parameter(
- provider: str,
- parameter_name: str,
- value: bool | int | int | float | str,
Set a parameter for the physics simulation provider.
- Parameters:
provider – Provider name. Only
"physics"is supported.parameter_name –
"ovstage-stage-ptr"or"physics-engine".value – Native OVStage pointer encoded as an integer, or physics-engine name.
- Raises:
ValueError – If the provider, parameter name, or value type is unsupported.
- isaacsim.physics.ovsim.control.simulation.get_parameter(
- provider: str,
- parameter_name: str,
Get a parameter from the physics simulation provider.
- Parameters:
provider – Provider name. Only
"physics"is supported.parameter_name – Parameter to retrieve. Only
"ovstage-stage-ptr"is supported.
- Returns:
Native OVStage pointer encoded as an integer.
- Return type:
int
- Raises:
ValueError – If the provider or parameter name is unsupported.
Data#
Data operations resolve physics entity views using the active engine. The
optional timestamp parameter is accepted for OV SIM compatibility, but
time-sampled reads and writes are not yet applied.
str, timestamp: float | None = None) -> list[str] | list[list[str]] | warp.array |
|
str, values: str | collections.abc.Sequence[str] | collections.abc.Sequence[collections.abc.Sequence[str]] | warp.array, timestamp: float | None = None) -> None |
- isaacsim.physics.ovsim.data.read(
- paths: str | collections.abc.Sequence[str],
- attribute_name: str,
- timestamp: float | None = None,
Read an attribute from one or more physics prims.
- Parameters:
paths – Prim path or sequence of prim paths to read.
attribute_name – Name of the attribute to read.
timestamp – Optional USD time code. Time-sampled reads are not yet applied.
- Returns:
Attribute values for the requested prim paths.
- Return type:
object
- Raises:
RuntimeError – If no active physics engine supports the requested attribute.
- isaacsim.physics.ovsim.data.write(
- paths: str | collections.abc.Sequence[str],
- attribute_name: str,
- values: str | collections.abc.Sequence[str] | collections.abc.Sequence[collections.abc.Sequence[str]] | warp.array,
- timestamp: float | None = None,
Write an attribute on one or more physics prims.
- Parameters:
paths – Prim path or sequence of prim paths to update.
attribute_name – Name of the attribute to write.
values – Attribute values to assign.
timestamp – Optional USD time code. Time-sampled writes are not yet applied.
- Raises:
RuntimeError – If no active physics engine supports the requested attribute.