Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to mujoco 2.3.5 #15

Open
krishpop opened this issue Feb 8, 2024 · 1 comment
Open

Updating to mujoco 2.3.5 #15

krishpop opened this issue Feb 8, 2024 · 1 comment

Comments

@krishpop
Copy link

krishpop commented Feb 8, 2024

I am trying to update the libs and rebuild the project for mujoco 2.3.3 (which I checked out the relevant files from the upstream repo at https://github.com/stillonearth/MuJoCo-WASM/tree/main/lib). This is in order to use some of the latest assets from Menagerie. However, building main.genned.c fails due to the updated libraries. Outside of the files in lib/ and include/ what are the files/folders in this repo to update in order to get the new version of mujoco to build with this project? Happy to make a PR / branch for this too if there is a need!

Here are some of the build errors I am seeing currently:

[ 50%] Building CXX object src/CMakeFiles/mujoco_wasm.dir/main.genned.cc.o
~/mujoco_wasm/src/main.genned.cc:59:43: error: no member named 'nmeshtexvert' in 'mjModel_'; did you mean 'nmeshvert'?
   59 |   int  nmeshtexvert  () const { return m->nmeshtexvert  ; }
      |                                           ^~~~~~~~~~~~
      |                                           nmeshvert
~/mujoco_wasm/include/mujoco/mjmodel.h:561:7: note: 'nmeshvert' declared here
  561 |   int nmeshvert;                  // number of vertices in all meshes
      |       ^
~/mujoco_wasm/src/main.genned.cc:228:74: error: no member named 'nmeshtexvert' in 'mjModel_'; did you mean 'nmeshvert'?
  228 |   val  mesh_texcoord          () const { return val(typed_memory_view(m->nmeshtexvert    * 2        , m->mesh_texcoord          )); }
      |                                                                          ^~~~~~~~~~~~
      |                                                                          nmeshvert
~/mujoco_wasm/include/mujoco/mjmodel.h:561:7: note: 'nmeshvert' declared here
  561 |   int nmeshvert;                  // number of vertices in all meshes
      |       ^
~/mujoco_wasm/src/main.genned.cc:644:91: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  644 |   void   _error              (std::string msg     ) { return mju_error                   (msg.c_str()         ); }
      |                                                                                           ^~~~~~~~~~~
~/mujoco_wasm/src/main.genned.cc:644:91: note: treat the string as an argument to avoid this
  644 |   void   _error              (std::string msg     ) { return mju_error                   (msg.c_str()         ); }
      |                                                                                           ^
      |                                                                                           "%s", 
~/mujoco_wasm/src/main.genned.cc:647:91: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  647 |   void   _warning            (std::string msg     ) { return mju_warning                 (msg.c_str()         ); }
      |                                                                                           ^~~~~~~~~~~
~/mujoco_wasm/src/main.genned.cc:647:91: note: treat the string as an argument to avoid this
  647 |   void   _warning            (std::string msg     ) { return mju_warning                 (msg.c_str()         ); }
      |                                                                                           ^
      |                                                                                           "%s", 
~/mujoco_wasm/src/main.genned.cc:1584:39: error: no member named 'inteval' in 'mjLROpt_'; did you mean 'interval'?
 1584 |       .field("inteval"    , &mjLROpt::inteval)    // evaluation time interval (at the end)
      |                              ~~~~~~~~~^~~~~~~
      |                                       interval
~/mujoco_wasm/include/mujoco/mjmodel.h:364:10: note: 'interval' declared here
  364 |   mjtNum interval;                // evaluation time interval (at the end)
      |          ^
@krishpop krishpop changed the title using mujoco 2.3.3 Updating to mujoco 2.3.3 Feb 8, 2024
@krishpop
Copy link
Author

krishpop commented Feb 8, 2024

Update: after fixing all of the variable naming errors in main.genned.cpp, I was able to get build to work, but there are separate related problems now. Loading the Mug asset now fails with the error below, and the Cassie scene is also unable to load (bottom). Any hints as to where to look for resolving these issues?

image
image

@krishpop krishpop changed the title Updating to mujoco 2.3.3 Updating to mujoco 2.3.5 Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant