Skip to content

Commit 86a61d6

Browse files
authored
Update README.md
1 parent c448371 commit 86a61d6

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,16 @@ MATLAB R2022b or newer is recommended. Install MATLAB with the above products an
2929
- (Linux users) Install GLFW library from Ubuntu terminal
3030

3131
`sudo apt update && sudo apt install libglfw3 libglfw3-dev`
32-
- 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.
3535

36-
`>>mujoco_interface_setup`
36+
`>>install`
3737
- (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).
3838
`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!*
50-
51-
### Blocks
52-
<img width="400" alt="mjLib" src="https://user-images.githubusercontent.com/8917581/230754094-908a0a52-2c5d-4e8e-bd82-d2dcc553a846.png">
53-
54-
MuJoCo Plant block steps MuJoCo engine, renders visualization window & camera, sets actuator data, and outputs sensor readings
55-
56-
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.
63-
64-
65-
https://user-images.githubusercontent.com/8917581/230754110-e98b0ed6-05af-416c-9f39-7e5abf562b25.mp4
66-
67-
https://user-images.githubusercontent.com/8917581/230754121-8486a61f-a2db-452c-a943-8682172b4f46.mp4
68-
39+
- Now follow the build instructions provided below. The prebuilt binaries are no longer shipped.
6940

70-
## Build Instructions (optional)
41+
## Build Instructions (mandatory)
7142

7243
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.
7344

@@ -102,6 +73,35 @@ Steps for building/rebuilding the C-MEX S-Function code. These instructions are
10273
- `>> mex -setup c++`
10374
- `>> build`
10475

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!*
86+
87+
### Blocks
88+
<img width="400" alt="mjLib" src="https://user-images.githubusercontent.com/8917581/230754094-908a0a52-2c5d-4e8e-bd82-d2dcc553a846.png">
89+
90+
MuJoCo Plant block steps MuJoCo engine, renders visualization window & camera, sets actuator data, and outputs sensor readings
91+
92+
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.
99+
100+
101+
https://user-images.githubusercontent.com/8917581/230754110-e98b0ed6-05af-416c-9f39-7e5abf562b25.mp4
102+
103+
https://user-images.githubusercontent.com/8917581/230754121-8486a61f-a2db-452c-a943-8682172b4f46.mp4
104+
105105
## Tips and Tricks
106106
- ***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.
107107
- ***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

Comments
 (0)