MuJoCo MPC (MJPC)
Github Repository
MuJoCo MPC (MJPC)
Installation
MJPC is tested with Ubuntu 20.04 and macOS-12. In principle, other versions and Windows operating system should work with MJPC, but these are not tested.
- macOS
- Install
Xcode
&ninja
andzlib
:brew install ninja zlib
- Install
- Ubuntu 20.04
sudo apt-get update && sudo apt-get install cmake libgl1-mesa-dev libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev ninja-build zlib1g-dev clang-12
Configure & Build:
Clone MuJoCo MPC
git clone https://github.com/google-deepmind/mujoco_mpc
cd mujoco_mpc
mkdir build
cd build
- macOS-12
MuJoCo MPC를 macOS-12에서 빌드하려면,
CMakeLists.txt
파일에서 abseil 버전 지정 부분을 아래와 같이 수정해야 합니다.# TODO(nimrod): Update to the latest version of abseil, or use the one defined # by MuJoCo, once grpc fix their build issues. set(MUJOCO_DEP_VERSION_abseil bc257a88f7c1939f24e0379f14a3589e926c950c # LTS 20230802.1 CACHE STRING "Version of `abseil` to be fetched." FORCE )
cmake .. -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja -DMJPC_BUILD_GRPC_SERVICE:BOOL=ON
- Ubuntu 20.04
cmake .. -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja -DCMAKE_C_COMPILER:STRING=clang-12 -DCMAKE_CXX_COMPILER:STRING=clang++-12 -DMJPC_BUILD_GRPC_SERVICE:BOOL=ON
Note: gRPC is a large dependency and can take 10-20 minutes to initially download.
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- mujoco::FindOrFetch: checking for targets in package `gRPC`
-- mujoco::FindOrFetch: checking for targets in package `gRPC` - target `gRPC` not defined.
-- mujoco::FindOrFetch: Using FetchContent to retrieve `gRPC`
...
...
-- Generating done (1.8s)
-- Build files have been written to: /Users/joonhyung-lee/personal/codes/mujoco_mpc/build
Now, we can build mjpc
cmake --build . --config=Release
cd bin
./mjpc
Enjoy Reading This Article?
Here are some more articles you might like to read next: