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

XML Error: unknown plugin 'mujoco.elasticity.cable' when running simulate #723

Closed
JohnChen1024a opened this issue Feb 6, 2023 · 11 comments
Labels
question Request for help or information

Comments

@JohnChen1024a
Copy link

When I loaded the model "belt.xml" in the directory of model/plugin to "simulate" program of MuJoCo, I got the following error message:
XML Error: unknown plugin 'mujoco.elasticity.cable'
Element 'required', line 20
Any suggestion for fixing this error is welcome.
My environment: Ubuntu 20.04, MuJoCo version 2.3.1

@JohnChen1024a JohnChen1024a added the question Request for help or information label Feb 6, 2023
@saran-t
Copy link
Member

saran-t commented Feb 6, 2023

How did you obtain/install MuJoCo on your machine?

@JohnChen1024a
Copy link
Author

I downloaded source code from github of MuJoCo, and built it using cmake. (make build;cd build;cmake ..;make -j 8) Under bin, run "simulate" and drag "belt.xml" to it.

@saran-t
Copy link
Member

saran-t commented Feb 7, 2023

I'd recommend using our prebuilt binary unless you're planning on modifying MuJoCo source code.

To answer your specific question, you need to make a directory called mujoco_plugin alongside the simulate binary and copy libelasticity.so into that directory. (The simulate application searches for plugins in mujoco_plugin. This is set up during CMake's install phase, but not the build phase, so if you aren't running cmake --install then you need to create the directory manually.)

@saran-t saran-t closed this as completed Feb 7, 2023
@JohnChen1024a
Copy link
Author

@saran-t Thank you for your help. It works. I suggest this information of searching for plugin directory should be added to the "build from source" section.

@yuvaltassa
Copy link
Collaborator

@JohnChen1024a, would you like to submit a PR to update the docs as you propose?

@tadashiK
Copy link

tadashiK commented Mar 19, 2023

@yuvaltassa and @saran-t , thanks a lot for addressing this issue.

I encountered the same problem when I installed mujoco via pip or conda. Would you tell me how to fix the issue in this case too?

As for a PR, I would do including a solution fo this too.

To repicate the issue, please use the following colab: https://colab.research.google.com/drive/1tOP38GGEe6xyzKkhhBOgudmn69PDck87?usp=sharing

@zichunxx
Copy link

Hi @saran-t I need to test the mujoco plugin I made and build mujoco from source. However, there is no mujoco_plugin folder alongside the simulate binary file after cmake --install. Thanks.

@DMackRus
Copy link

Hello,

I am having similar issues to the ones in this post. I have a custom MuJoCo fork (it's a tiny change and I was hoping it could be added to MuJoCo directly, please see this request issue (#1453)). I just wanted public access to one function mj_stepSkip() for my own uses.

When i follow the instructions of building from source, I do not have the first party plugins? Currently I have a working hack where I build my custom fork from source, download the latest release and copy the plugins over. This seems fine at the moment I just dont know if it might break down the line.

@saran-t
Copy link
Member

saran-t commented May 20, 2024

@DMackRus the plugins are actually built when you run cmake --build, the problem is that cmake --install isn't copying them over.

This is an oversight in our installation setup, but in the meantime you should be able to find these plugins in the lib directory of your build tree.

@DMackRus
Copy link

@saran-t

Thank you for your reply, yes that makes sense and I can just add a quick command to my shell script to copy the plugins folder over then to automate my issue, thanks!

@traversaro
Copy link
Contributor

@DMackRus if you already have a fork in which you are working, probably cherry-picking the changes in #1515 could help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Request for help or information
Projects
None yet
Development

No branches or pull requests

7 participants