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. |
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.
- Type: TSubclassOf<UMjCameraFeedEntry>
- Editor: ✏️ EditAnywhere
- Category: MuJoCo|UI
ActiveCameraFeeds¶
Cache of active camera feed entries for tick updates and teardown.
- Type: TArray<UMjCameraFeedEntry*>
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*
KeyframeSelector¶
Dropdown for selecting keyframes on the current articulation.
- Type: UComboBoxString*
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. |
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(floatNewValue,const FString&OptionName)
HandleActuatorChanged¶
Specific handler for actuator control changes.
- Signature:
HandleActuatorChanged(floatNewValue,const FString&ActuatorName)
HandleTwistOptionChanged¶
Handles twist velocity slider changes.
- Signature:
HandleTwistOptionChanged(floatNewValue,const FString&OptionName)
OnReplaySessionSelected¶
Handles replay session dropdown selection.
- Signature:
OnReplaySessionSelected(FStringSelectedItem,ESelectInfo::TypeSelectionType)
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(FStringSelectedItem,ESelectInfo::TypeSelectionType)
RefreshKeyframeDropdown¶
Refreshes keyframe dropdown for the current articulation.
- Signature:
RefreshKeyframeDropdown()
HandleReplayBindingEnabledChanged¶
Handles Enabled checkbox changes for replay bindings.
- Signature:
HandleReplayBindingEnabledChanged(boolbIsChecked)
HandleReplayBindingRelPosChanged¶
Handles RelPos checkbox changes for replay bindings.
- Signature:
HandleReplayBindingRelPosChanged(boolbIsChecked)