You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Download the latest release of this repository (MATLAB Toolbox - MLTBX file)
33
-
- Open MATLAB R2022b or higher and install the downloaded MATLAB Toolbox file
34
-
- Run the setup function packaged in the toolbox. MuJoCo (and GLFW for Windows users) library is downloaded and added to MATLAB path.
32
+
- Download the latest source zip of this repository and store it in some location (preferably not in Downloads)
33
+
- Open MATLAB R2022b or higher and open the repo folder.
34
+
- Run the setup function packaged in the toolbox. MuJoCo (and GLFW for Windows users) library is automatically downloaded and added to MATLAB path.
35
35
36
-
`>>mujoco_interface_setup`
36
+
`>>install`
37
37
- (Linux users) The default pathdef.m is likely not saveable in Linux. Save pathdef.m to new location as given in this [MATLAB answer](https://www.mathworks.com/matlabcentral/answers/1653435-how-to-use-savepath-for-adding-path-to-pathdef-m-in-linux).
38
38
`savepath ~/Documents/MATLAB/pathdef.m`
39
-
40
-
## Usage
41
-
`>>mj_gettingStarted`
42
-
43
-
Open the example model and run it in normal simulation mode.
44
-
45
-
If the installation is successful, you should see a pendulum model running in a separate window and camera streams displayed by Video Viewer blocks (Computer Vision Toolbox).
46
-
47
-
*A dedicated graphics card is recommended for the best performance. Disable Video Viewer blocks if the model runs slow*
48
-
49
-
*(Linux users) - In case MATLAB crashes, it may be due to a glibc bug. Please follow this [bug report](https://www.mathworks.com/support/bugreports/2632298) for a workaround!*
It takes an XML (MJCF) as the main block parameter. It auto-detects the inputs, sensors, and cameras from XML to configure the block ports and sample time.
57
-
58
-
Inputs can either be a Simulink Bus or a vector.
59
-
60
-
Sensors are output as a Simulink Bus.
61
-
62
-
RGB and Depth buffers from cameras are output as vectors. These can be decoded to Simulink image/matrix using the RGB and Depth Parser blocks.
- Now follow the build instructions provided below. The prebuilt binaries are no longer shipped.
69
40
70
-
## Build Instructions (optional)
41
+
## Build Instructions (mandatory)
71
42
72
43
Steps for building/rebuilding the C-MEX S-Function code. These instructions are only required if you are cloning the repository instead of downloading the release.
73
44
@@ -102,6 +73,35 @@ Steps for building/rebuilding the C-MEX S-Function code. These instructions are
102
73
-`>> mex -setup c++`
103
74
-`>> build`
104
75
76
+
## Usage
77
+
`>>mj_gettingStarted`
78
+
79
+
Open the example model and run it in normal simulation mode.
80
+
81
+
If the installation is successful, you should see a pendulum model running in a separate window and camera streams displayed by Video Viewer blocks (Computer Vision Toolbox).
82
+
83
+
*A dedicated graphics card is recommended for the best performance. Disable Video Viewer blocks if the model runs slow*
84
+
85
+
*(Linux users) - In case MATLAB crashes, it may be due to a glibc bug. Please follow this [bug report](https://www.mathworks.com/support/bugreports/2632298) for a workaround!*
It takes an XML (MJCF) as the main block parameter. It auto-detects the inputs, sensors, and cameras from XML to configure the block ports and sample time.
93
+
94
+
Inputs can either be a Simulink Bus or a vector.
95
+
96
+
Sensors are output as a Simulink Bus.
97
+
98
+
RGB and Depth buffers from cameras are output as vectors. These can be decoded to Simulink image/matrix using the RGB and Depth Parser blocks.
-***Code generation*** - The MuJoCo Plant block supports code generation (Simulink Coder) and monitor and tune for host target. Refer to mj_monitorTune.slx for more info.
107
107
-***Performance improvement*** - In case you want to reduce the mask initialization overhead, you can directly use the underlying S-Function. Select the MuJoCo Plant block and Ctrl+U to look under the subsystem mask. Make sure to call the initialization functions (whenever the MJCF XML model changes).
0 commit comments