Skip to content

UMjZmqComponent

Abstract base class for components that communicate with the MuJoCo simulation via ZeroMQ (or similar sockets).

Provides lifecycle hooks (Init/Shutdown) and simulation step hooks (PreStep/PostStep) that are executed on the dedicated MuJoCo physics thread.

Attribute Value
Kind Class
UE Macro UCLASS
Inherits UActorComponent
Blueprint Spawnable ✅ Yes

Functions

Public Functions

General

Function Returns Description
UMjZmqComponent() Default constructor.
InitZmq() void Called to initialize ZMQ sockets/contexts. Runs on Async thread.
ShutdownZmq() void Called to shutdown ZMQ resources. Runs on Async thread.
PreStep() void Executed before mj_step().
PostStep() void Executed after mj_step().
UMjZmqComponent

Default constructor.

  • Signature: UMjZmqComponent()
InitZmq

Called to initialize ZMQ sockets/contexts. Runs on Async thread.

  • Signature: InitZmq()
ShutdownZmq

Called to shutdown ZMQ resources. Runs on Async thread.

  • Signature: ShutdownZmq()
PreStep

Executed before mj_step().

  • Signature: PreStep(mjModel* m, mjData* d)
PostStep

Executed after mj_step().

  • Signature: PostStep(mjModel* m, mjData* d)