google-deepmind / mujoco_mpc

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

Build Error: No matching function for call in batch_parameter_test.cc #198

Closed xueminchi closed 11 months ago

xueminchi commented 11 months ago

Hi mjpc team,

While following the instructions in the readme file to install and test the project, I encountered a build issue.

Error log:

[build] /home/cxm/cpp_project/mujoco_mpc/mujoco_mpc/mjpc/test/estimator/batch_parameter_test.cc:109:21: error: no matching function for call to ‘mjpc::Batch::Optimize(mjpc::ThreadPool&)’
[build]   109 |   estimator.Optimize(pool);
[build]       |   ~~~~~~~~~~~~~~~~~~^~~~~~
[build] In file included from /home/cxm/cpp_project/mujoco_mpc/mujoco_mpc/mjpc/test/estimator/batch_parameter_test.cc:19:
[build] /home/cxm/cpp_project/mujoco_mpc/mujoco_mpc/mjpc/test/../../mjpc/estimators/batch.h:163:8: note: candidate: ‘void mjpc::Batch::Optimize()’
[build]   163 |   void Optimize();
[build]       |        ^~~~~~~~
[build] /home/cxm/cpp_project/mujoco_mpc/mujoco_mpc/mjpc/test/../../mjpc/estimators/batch.h:163:8: note:   candidate expects 0 arguments, 1 provided

As a temporary fix, I removed the 'pool' argument from the function call, and it resolved the issue. I'm curious to know if this is the right way to address the problem or if there are other implications I should be aware of.

Thank you for your guidance and assistance!

erez-tom commented 11 months ago

Thanks for pointing it out! This was fixed on the deepmind branch, and will soon be merged to main: https://github.com/google-deepmind/mujoco_mpc/pull/199