google-deepmind / mujoco_mpc

Real-time behaviour synthesis with MuJoCo, using Predictive Control
https://github.com/deepmind/mujoco_mpc
Apache License 2.0
898 stars 130 forks source link

MJPC on Ubuntu #280

Closed vikashplus closed 1 month ago

vikashplus commented 5 months ago

I'm facing compilation issues with MJPC on Ubuntu. I followed the build instructions mentioned here. Here are all the options that I tried

I'm curious if the Ubuntu build is supported at the moment. The error logs are build-related, quite long, and different for different settings. Please let me know if it will help to add the logs here.

vikashplus commented 5 months ago

Update: So the secret sauce so far is dba4bd8d51b2233e637e00e1625593890bf4abaf and Clang 12.0.0

sudo apt install clang-12

yuvaltassa commented 5 months ago

Would you like to send a PR to update the documentation?

vikashplus commented 5 months ago

It's a workaround for now. @thowell is getting his Ubuntu machine soon. Expect a PR once we have a watertight solution that will work more broadly.

thowell commented 5 months ago

I just did a fresh install of Ubuntu 23.10 and didn't run into any build problems with MJPC when following the instructions on the README. I used clang 16.0.6.

vikashplus commented 5 months ago

I am on Ubuntu 20.04

A few thoughts

thowell commented 5 months ago

Tested with a fresh install of Ubuntu 22.04 with clang-12 and that worked as well. I will update the README to include this step and to look at the build.yml if troubleshooting an install.

thowell commented 5 months ago

@vikashplus should we add any additional instructions? #286

vikashplus commented 5 months ago

Clang 12 is the primary thing for the setup I tested for. Let's merge for now. I'll update you if I learn anything new.

richardrl commented 4 months ago

I think we should put a note on the main page to use Clang12, Clang12++.

I did the following to get things to compile on ubuntu 20. with gcc, it errors around 70%

mkdir build
cd build
sudo apt-get install clang-12
CXX=clang12++ CC=clang12 cmake ..
make -j 5
thowell commented 1 month ago

@vikashplus please see #324