ISimulationManager#
Fully qualified name: isaacsim::core::simulation_manager::ISimulationManager
-
struct ISimulationManager#
Interface for managing simulation state and callbacks.
Provides functionality for:
Registering and managing callbacks for simulation events
Controlling simulation state and timing
Managing USD notice handlers
Querying simulation and system time information
This interface serves as the main entry point for simulation management operations in Isaac Sim.
Public Functions
- virtual int registerDeletionCallback( ) = 0#
Registers a callback function to be called when a deletion event occurs.
- Parameters:
callback – [in] Function to be called with the path of the deleted item.
- Returns:
Unique identifier for the registered callback.
- virtual int registerPhysicsSceneAdditionCallback( ) = 0#
Registers a callback function to be called when a physics scene is added.
- Parameters:
callback – [in] Function to be called with the path of the added physics scene.
- Returns:
Unique identifier for the registered callback.
-
virtual bool deregisterCallback(const int &callbackId) = 0#
Deregisters a previously registered callback.
- Parameters:
callbackId – [in] The unique identifier of the callback to deregister.
- Returns:
True if callback was successfully deregistered, false otherwise.
-
virtual void reset() = 0#
Resets the simulation manager to its initial state.
-
virtual int &getCallbackIter() = 0#
Gets the current callback iteration counter.
- Returns:
Reference to the current callback iteration counter.
-
virtual void setCallbackIter(int const &val) = 0#
Sets the callback iteration counter.
- Parameters:
val – [in] New value for the callback iteration counter.
-
virtual void enableUsdNoticeHandler(bool const &flag) = 0#
Enables or disables the USD notice handler.
- Parameters:
flag – [in] True to enable the handler, false to disable.
- virtual void enableFabricUsdNoticeHandler(
- long stageId,
- bool const &flag,
Enables or disables the USD notice handler for a specific fabric stage.
- Parameters:
stageId – [in] ID of the fabric stage.
flag – [in] True to enable the handler, false to disable.
-
virtual bool isFabricUsdNoticeHandlerEnabled(long stageId) = 0#
Checks if the USD notice handler is enabled for a specific fabric stage.
- Parameters:
stageId – [in] ID of the fabric stage to check.
- Returns:
True if the handler is enabled for the stage, false otherwise.
-
virtual double getSimulationTime() = 0#
Gets the current simulation time.
- Returns:
The current simulation time.
-
virtual double getSimulationTimeMonotonic() = 0#
Gets the current simulation time which does not reset when the simulation is stopped.
- Returns:
The current simulation time.
-
virtual double getSystemTime() = 0#
Gets the current system time.
- Returns:
The current system time.
-
virtual omni::fabric::RationalTime getCurrentTime() = 0#
Gets the current frame time from StageReaderWriter.
Returns the current frame time from StageReaderWriter’s getFrameTime() to ensure temporal consistency between time sample storage and frame timing.
This is useful for testing to track exact frame times being written to storage.
- Returns:
Current rational time or kInvalidRationalTime if unavailable.
-
virtual size_t getNumPhysicsSteps() = 0#
Gets the current physics step count.
- Returns:
The current physics step count.
-
virtual bool isSimulating() = 0#
Gets the current simulation time.
- Returns:
The current simulation time.
-
virtual bool isPaused() = 0#
Gets the current simulation pause state.
- Returns:
The current simulation pause state.
- virtual double getSimulationTimeAtTime(
- const omni::fabric::RationalTime &rtime,
Gets simulation time at a specific rational time.
Returns the simulation time corresponding to a specific rational time.
- Parameters:
rtime – [in] Rational time to query simulation time for.
- Returns:
Simulation time in seconds at the specified time.
- virtual double getSimulationTimeMonotonicAtTime(
- const omni::fabric::RationalTime &rtime,
Gets monotonic simulation time at a specific rational time.
Returns the monotonically increasing simulation time corresponding to a specific rational time.
- Parameters:
rtime – [in] Rational time to query monotonic simulation time for.
- Returns:
Monotonic simulation time in seconds at the specified time.
- virtual double getSystemTimeAtTime(
- const omni::fabric::RationalTime &rtime,
Gets system time at a specific rational time.
Returns the system (real-world) time corresponding to a specific rational time.
- Parameters:
rtime – [in] Rational time to query system time for.
- Returns:
System time in seconds at the specified time.
-
virtual std::vector<TimeSampleStorage::Entry> getAllSamples() = 0#
Gets all stored samples for testing and validation.
- Returns:
Vector of all stored sample entries.
-
virtual size_t getSampleCount() = 0#
Gets the count of stored samples.
- Returns:
Number of stored samples.
-
virtual void logStatistics() = 0#
Logs sample storage statistics for debugging.
- virtual std::optional<std::pair<omni::fabric::RationalTime, omni::fabric::RationalTime>> getSampleRange(
Gets the time range of stored samples.
- Returns:
Pair of (earliest_time, latest_time), or nullopt if empty.
-
virtual size_t getBufferCapacity() = 0#
Gets the maximum buffer capacity for time sample storage.
- Returns:
Maximum number of samples that can be stored in the buffer.