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

Unable to load file error when running mj_gettingStarted example #5

Open
LoreMoretti opened this issue Jul 18, 2023 · 6 comments
Open

Comments

@LoreMoretti
Copy link

Thanks a lot for the library!

I have tried to run the mj_gettingStarted but I get the following error:

Error in '[mj_gettingStarted/MuJoCo Plant](matlab:open_and_hilite_hyperlink ('mj_gettingStarted/MuJoCo Plant','error'))': Failed to evaluate mask initialization commands.
Caused by:
Unable to load file

I think it is caused by:

mj_initbus('dummy.xml')

and I checked that 'dummy.xml' actually exists and it it visible to Matlab (respectively with exists() and which() commands).

If I pass to mj_initbus() the fullpath of 'dummy.xml', I get:

Simulink.Bus.createObject reported the following error when processing the field 'PerspectiveCamera' in the input structure:
''Dimensions' must be a double vector consisting of positive elements. For signals with more than 2 dimensions, the trailing dimension must not be 1.'

Any idea why?

Thanks

@vmanoj1996
Copy link
Member

Hmm. Which MATLAB version are you using?
Also are you using a different version of MuJoCo? Different from the one downloaded by install.m

I will try the same at my end

@LoreMoretti
Copy link
Author

LoreMoretti commented Jul 19, 2023

I have installed your library as follows running the install.m function from the Matlab Command Window:

>> install
 
Download URL is:
https://github.com/deepmind/mujoco/releases/download/2.3.5/mujoco-2.3.5-linux-x86_64.tar.gz
 
mujoco downloaded and extracted to this path:
/home/lomoretti/Downloads/mujoco_simulink_blockset/Release_glnxa64_2022b_2.3.5/lib/glnxa64/mujoco
 
MuJoCo block library and examples added to MATLAB path and saved
>> mujoco_interface_setup
'mujoco_interface_setup' is not found in the current folder or on the MATLAB path, but exists in:
    /home/lomoretti/Downloads/mujoco_simulink_blockset

Change the MATLAB current folder or add its folder to the MATLAB path.
 
>> mujoco_interface_setup
 
Download URL is:
https://github.com/deepmind/mujoco/releases/download/2.3.5/mujoco-2.3.5-linux-x86_64.tar.gz
 
folder exists already. it will be overwritten
Warning: Directory already exists. 
> In install/downloader (line 108)
In install (line 20)
In mujoco_interface_setup (line 11) 
 
mujoco downloaded and extracted to this path:
/home/lomoretti/Downloads/mujoco_simulink_blockset/Release_glnxa64_2022b_2.3.5/lib/glnxa64/mujoco
 
MuJoCo block library and examples added to MATLAB path and saved
>> mj_gettingStarted
>> 

I am using Matlab 2022b and I am on Ubuntu 22.04.

@LoreMoretti
Copy link
Author

It seems the error is raised here:

https://github.com/mathworks-robotics/mujoco-simulink-blockset/blob/9d54a4b5b4e2550432828f716934119e968455b4/src/mj_initbus_mex.cpp#L55C1-L59C10

If I remove all the cameras elements from the xml which is being loaded, the xml file gets loaded successfully by the MujocoPlant block. But when starting the simulation, right after the compilation phase, Simulink crashes.

Is this helpful for your debugging?

Thanks a lot for your help!

@vmanoj1996
Copy link
Member

Hi Lorenzo,
That's helpful. Thanks for trying out. About the crash, have you tried running load_sl_glibc_patch command before opening Simulink?

I do not have a Linux PC near me currently. I will try to set one up asap and debug. The error with init bus should not really be happening. I didnot see it earlier too.

@LoreMoretti
Copy link
Author

LoreMoretti commented Jul 21, 2023

Hi Manoj,

just tried to run load_sl_glibc_patch. But same crash occurs.

Thanks for investigating!

@MohammadrezaDindarloo
Copy link

hi, I had a problem like this, I didn't find the solution but I handle it by migrate to matlab 2023a version. It worked for me.

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

3 participants