Skip to content

Instantly share code, notes, and snippets.

@ericjang
Last active September 2, 2016 17:16
Show Gist options
  • Save ericjang/ad00012e28fa3d689beea779bd8797e2 to your computer and use it in GitHub Desktop.
Save ericjang/ad00012e28fa3d689beea779bd8797e2 to your computer and use it in GitHub Desktop.
running headless Mujoco on OSX 10.11
# step 1: install CMake command line on Mac OSX
# download https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
cd <cmake-root-dir>
./bootstrap
make
make install
# step 2: download GLFW source from http://www.glfw.org/download.html
cd <glfw-root-dir>
cmake .
cmake -D BUILD_SHARED_LIBS=ON . # mujoco attempts to load libglfw.3.dylib so we build a shared lib rather than static .a
# run example binary in headless mode
cp mjkey ~/.mujoco/mjpro140/bin/.
cd ~/.mujoco/mjpro140/bin
./record ../models/humanoid.xml 25 60 rgb.out # for some reason the key isn't recognized when executing outside of bin
# convert data to video
ffmpeg -f rawvideo -pixel_format rgb24 -video_size 800x800 -framerate 60 -i rgb.out -vf "vflip" video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment