Skip to content

UMjSimulateWidget

Main dashboard mimicking MuJoCo's "simulate" UI.

Features: - Top Bar: Time, Step, Real-time factor. - Sidebars: Physics options, Articulation controls.

Attribute Value
Kind Class
UE Macro UCLASS
Inherits UUserWidget

Properties

Protected Properties

Property Type Description
ManagerSettingsList UVerticalBox* Container for manager-wide physics settings.
ArticulationControlList UVerticalBox* Container for the selected articulation's actuators.
ArticulationSelector UComboBoxString* Dropdown to select which articulation to control.
TimeText UTextBlock* Text block for simulation time.
PlayPauseButton UButton* Button to Play/Pause simulation.
ResetButton UButton* Button to Reset simulation.
RecordButton UButton* Button to Start Recording.
ReplayButton UButton* Button to Start Replay.
SnapshotButton UButton* Button to Capture Simulation Snapshot.
RestoreButton UButton* Button to Restore Simulation Snapshot.
PropertyRowClass TSubclassOf<UMjPropertyRow> The MjPropertyRow class to spawn for each setting.
CameraFeedEntryClass TSubclassOf<UMjCameraFeedEntry> Blueprint class for a single camera feed entry row.
PossessButton UButton* Button to Possess/Release the selected articulation.
ManagerRef AAMjManager* --- Internal State ---
bIsPossessing bool Whether we're currently possessing an articulation.
OriginalPawn APawn* The pawn we were controlling before possession.
ActiveCameraFeeds TArray<UMjCameraFeedEntry*> Cache of active camera feed entries for tick updates and teardown.
LastSnapshot class UMjSimulationState* The most recently captured simulation snapshot.

ManagerSettingsList

Container for manager-wide physics settings.

  • Type: UVerticalBox*

ArticulationControlList

Container for the selected articulation's actuators.

  • Type: UVerticalBox*

ArticulationSelector

Dropdown to select which articulation to control.

  • Type: UComboBoxString*

TimeText

Text block for simulation time.

  • Type: UTextBlock*

PlayPauseButton

Button to Play/Pause simulation.

  • Type: UButton*

ResetButton

Button to Reset simulation.

  • Type: UButton*

RecordButton

Button to Start Recording.

  • Type: UButton*

ReplayButton

Button to Start Replay.

  • Type: UButton*

SnapshotButton

Button to Capture Simulation Snapshot.

  • Type: UButton*

RestoreButton

Button to Restore Simulation Snapshot.

  • Type: UButton*

PropertyRowClass

The MjPropertyRow class to spawn for each setting.

  • Type: TSubclassOf<UMjPropertyRow>
  • Editor: ✏️ EditAnywhere
  • Category: MuJoCo|UI

CameraFeedEntryClass

Blueprint class for a single camera feed entry row.

PossessButton

Button to Possess/Release the selected articulation.

  • Type: UButton*

ManagerRef

--- Internal State ---

bIsPossessing

Whether we're currently possessing an articulation.

  • Type: bool

OriginalPawn

The pawn we were controlling before possession.

  • Type: APawn*

ActiveCameraFeeds

Cache of active camera feed entries for tick updates and teardown.

LastSnapshot

The most recently captured simulation snapshot.

Private Properties

Property Type Description
bIsMouseEnabled bool Tracks whether the mouse is currently visible and allowed to interact with the UI.
ReplaySessionSelector UComboBoxString* Dropdown for selecting replay sessions (dynamically created).
LoadCSVButton UButton* Load CSV button (dynamically created).
SaveRecordingButton UButton* Save Recording button (dynamically created).
KeyframeSelector UComboBoxString* Dropdown for selecting keyframes on the current articulation.
ResetToKeyframeButton UButton* Reset to Keyframe button.
HoldKeyframeButton UButton* Hold/Stop Hold toggle button.
CachedSessionCount int32 Cached session count for detecting changes in NativeTick.
ReplayEnabledCheckBoxes TArray<UCheckBox*> Parallel arrays of checkboxes for replay articulation bindings.

bIsMouseEnabled

Tracks whether the mouse is currently visible and allowed to interact with the UI.

  • Type: bool

ReplaySessionSelector

Dropdown for selecting replay sessions (dynamically created).

  • Type: UComboBoxString*

LoadCSVButton

Load CSV button (dynamically created).

  • Type: UButton*

SaveRecordingButton

Save Recording button (dynamically created).

  • Type: UButton*

KeyframeSelector

Dropdown for selecting keyframes on the current articulation.

  • Type: UComboBoxString*

ResetToKeyframeButton

Reset to Keyframe button.

  • Type: UButton*

HoldKeyframeButton

Hold/Stop Hold toggle button.

  • Type: UButton*

CachedSessionCount

Cached session count for detecting changes in NativeTick.

  • Type: int32

ReplayEnabledCheckBoxes

Parallel arrays of checkboxes for replay articulation bindings.

  • Type: TArray

Functions

Public Functions

MuJoCo|UI

Function Returns Description
SetupDashboard() void Initializes the widget with a reference to the manager.
SetupDashboard

Initializes the widget with a reference to the manager.

  • Signature: SetupDashboard(AAMjManager* InManager)
  • Blueprint: 🔵 Callable

Protected Functions

General

Function Returns Description
OnPlayPauseClicked() void --- Handlers ---
PopulateManagerSettings() void Fills the manager settings panel with rows.
RefreshArticulationControls() void Updates the articulation controls and monitors when selection changes.
UpdateMonitorValues() void Updates monitor values (Joints/Sensors) from public API.
HandleManagerOptionChanged() void Specific handler for manager property changes.
HandleActuatorChanged() void Specific handler for actuator control changes.
OnPossessClicked() void Handles possess/release button click.
HandleTwistOptionChanged() void Handles twist velocity slider changes.
OnReplaySessionSelected() void Handles replay session dropdown selection.
OnLoadCSVClicked() void Handles Load CSV button click.
OnSaveRecordingClicked() void Handles Save Recording button click.
RefreshReplaySessionDropdown() void Refreshes the replay session dropdown options.
RebuildReplayBindingUI() void Rebuilds the articulation binding checkboxes in the replay section.
OnPlayPauseClicked

--- Handlers ---

  • Signature: OnPlayPauseClicked()
PopulateManagerSettings

Fills the manager settings panel with rows.

  • Signature: PopulateManagerSettings()
RefreshArticulationControls

Updates the articulation controls and monitors when selection changes.

  • Signature: RefreshArticulationControls()
UpdateMonitorValues

Updates monitor values (Joints/Sensors) from public API.

  • Signature: UpdateMonitorValues()
HandleManagerOptionChanged

Specific handler for manager property changes.

  • Signature: HandleManagerOptionChanged(float NewValue, const FString& OptionName)
HandleActuatorChanged

Specific handler for actuator control changes.

  • Signature: HandleActuatorChanged(float NewValue, const FString& ActuatorName)
OnPossessClicked

Handles possess/release button click.

  • Signature: OnPossessClicked()
HandleTwistOptionChanged

Handles twist velocity slider changes.

  • Signature: HandleTwistOptionChanged(float NewValue, const FString& OptionName)
OnReplaySessionSelected

Handles replay session dropdown selection.

  • Signature: OnReplaySessionSelected(FString SelectedItem, ESelectInfo::Type SelectionType)
OnLoadCSVClicked

Handles Load CSV button click.

  • Signature: OnLoadCSVClicked()
OnSaveRecordingClicked

Handles Save Recording button click.

  • Signature: OnSaveRecordingClicked()
RefreshReplaySessionDropdown

Refreshes the replay session dropdown options.

  • Signature: RefreshReplaySessionDropdown()
RebuildReplayBindingUI

Rebuilds the articulation binding checkboxes in the replay section.

  • Signature: RebuildReplayBindingUI(UVerticalBox* ReplayBox)

Private Functions

General

Function Returns Description
OnKeyframeSelected() void Handles keyframe dropdown selection.
RefreshKeyframeDropdown() void Refreshes keyframe dropdown for the current articulation.
HandleResetToKeyframe() void Handles Reset to Keyframe button click.
HandleHoldKeyframe() void Handles Hold Keyframe button click.
HandleReplayBindingEnabledChanged() void Handles Enabled checkbox changes for replay bindings.
HandleReplayBindingRelPosChanged() void Handles RelPos checkbox changes for replay bindings.
OnKeyframeSelected

Handles keyframe dropdown selection.

  • Signature: OnKeyframeSelected(FString SelectedItem, ESelectInfo::Type SelectionType)
RefreshKeyframeDropdown

Refreshes keyframe dropdown for the current articulation.

  • Signature: RefreshKeyframeDropdown()
HandleResetToKeyframe

Handles Reset to Keyframe button click.

  • Signature: HandleResetToKeyframe()
HandleHoldKeyframe

Handles Hold Keyframe button click.

  • Signature: HandleHoldKeyframe()
HandleReplayBindingEnabledChanged

Handles Enabled checkbox changes for replay bindings.

  • Signature: HandleReplayBindingEnabledChanged(bool bIsChecked)
HandleReplayBindingRelPosChanged

Handles RelPos checkbox changes for replay bindings.

  • Signature: HandleReplayBindingRelPosChanged(bool bIsChecked)