google-deepmind / mujoco Goto Github PK
View Code? Open in Web Editor NEWMulti-Joint dynamics with Contact. A general purpose physics simulator.
Home Page: https://mujoco.org
License: Apache License 2.0
Multi-Joint dynamics with Contact. A general purpose physics simulator.
Home Page: https://mujoco.org
License: Apache License 2.0
I (pip) installed the latest version of mujoco-py==2.0.2.13
and it keeps looking for mujoco200 path. Is this expected behavior? Is this new 2.1 version still not actually usable?
Hi there,
Very thankful for the announcements.
I'd like to ask about MuJoCo modeling in mujoco forum.
But I got 404 response.
The forum is completely deleted?
Will the forum reopen? Or will be opened a page like a forum?
I am trying to turn the basic.cc file into an .exe. To compile it, in other words. I see there is a Makefile and dll files in bin.
I've spent time in visual studio trying to build. I've run basic.cc with gcc in the command line. I've looked online. I've installed several packages that were supposed to get make
to work in the commandline on WIndows.
Could you spare a minute to explain this? Sorry if it's not MuJoCo specific enough.
MuJoCo is designed to not dynamically allocate any memory at runtime, which is great for e.g. embedded applications. However, in many higher-level use cases, it is desirable to have a mechanism that would allow the mjData buffer to grow dynamically when full, rather than triggering a memory error.
In terms of implementation detail, this is possibly best done as a new C++ API that wraps the existing C API.
MuJoCo provides an explicit contract related to the mjtSTAGE
enum: All computations requiring only position and velocity (mjSTAGE_POS
and mjSTAGE_VEL
) happen in mj_step1()
, while computations related to accelerations and forces (mjSTAGE_ACC
) happen in mj_step2()
.
This contract is violated by the mass-matrix modification that happens in mj_Euler()
related to implicit integration of joint damping, since the output computation depends only on positions. This issue shows up, for example, when trying to perform efficient finite-differencing of mj_step()
skipping position-related computations when differencing velocities or controls.
shyamalchandra@Shyamals-iMac sample % make -f Makefile.macos
clang++ -O2 -I../include -L../bin -std=c++11 -stdlib=libc++ -mavx -pthread testxml.cc -lmujoco210nogl -o ../bin/testxml
ld: library not found for -lmujoco210nogl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1
Please let me know if I am missing something. Any help would be great!
Hi,
For some years I was using the Mujoco Haptix version, which comes with a precompiled MATLAB interface library. The version is not available on your web page or git, therefore I am curious if there are any plans for the future, for the MATLAB interface library to be available as open-source for Mujoco?
Thank you for the reply in advance!
Awesome news about open sourcing Mujoco, thank you very much for providing it!
We're looking in our next gen simulation environment, and Unity + Mujoco would be a big contender. Are they any plans on supporting the Unity plugin?
Hi,
I have a geom defined by a mesh. During runtime, I would like to change the size of that object by scaling the position of each vertex. After doing that, I get the object changed to my desired size, but its body_mass, body_inertia, and body_invweight0 are not changed. How would I change those values accordingly based on the new object scaling during run time? Thanks!
Follow up question:
Is the inertia tensor of a mesh computed as the inertia tensor of its bounding box, or it is computed from the contribution of each face of that mesh?
Friction section in mjcf modelling page does not convey the direction over which anisotropic friction force is exerted.
I am trying something similar to ice skating. Some experimentation reveals that it is acting along world frame's x, y axis.
Is there a way to get around this?
We would like to run some unit and integration tests continuously once we have the source code on github.
We'll probably use GitHub Actions for this, and would like to build and test on Linux, Windows, macOS.
I need to rescale rewards, so I'm wondering if it's possible to get an environment's minimum possible reward. Actions and states have min values, but I'm not sure if rewards do?
Can we have the binaries for aarch64 platform, i.e jetson nano, nx and agx available?
Hi,
First off, thank you for taking on this effort to open source and maintain MuJoCo, it's really greatly appreciated. I've been using MuJoCo for a while now so figure it may be nice to formally report some bugs I've noticed here. If you prefer I can split each of these into individual bug reports/feature requests.
Finally, at some point Emo said he was working on an incremental compiler for MuJoCo. Is that also on the development roadmap still?
The API reference (doc/APIreference.rst) is currently written by hand. This means it immediately goes out of date with any changes to the API.
We need a solution for auto-generating the API reference that satisfies the following requirements:
MJCF is well-documented, but a formal schema is not available. A schema based on e.g. XSD, relaxNG, or schematron would help 3rd parties write their own validators. For example DeepMind's mjcf
package required its own custom schema in order to properly verify and manipulate MJCF elements in Python.
Hey,
Today my license for mujoco expired so I downloaded the open-source version from DeepMind website "mujoco210" and placed it in ~/.mujoco folder and added the following line to my .bashrc file and source my .bashrc file.
export LD_LIBRARY_PATH=/home/sagar/.mujoco/mujoco210/bin
export PATH="$LD_LIBRARY_PATH:$PATH"
But still, I get the following error:
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=/home/sagar/.mujoco/mujoco210/bin
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sagar/.mujoco/mujoco200/bin
Can someone tell me if I am missing any point?
OS: Ubuntu 20.04 LTS
Python version: 3.7.5
Conda version: 4.10.1
I am a novice user of Mujoco, I try to run the simulator on the remote cluster but I met the following problem. I tried some of the online solutions, but no help. Although it reports problems related to GLX, the command "glxinfo" and "glxgears" works well.
@Mercury2 bin$ ./simulate
mujoco pro version 2.10 x
error of failed request: badrequest (invalid request code or no such operation)
major opcode of failed request: 151 (glx)
minor opcode of failed request: 0 ()
serial number of failed request: 9
current serial number in output stream: 9
segmentation fault
Sorry if this question points to something that might be outside of MuJoCo, but I'm not sure if this data comes from some script in MuJoCo or where I might find this data.
When you have something like this between a <body>
and a <joint>
, with a mesh in a <geom>
under that, where do you get this data for your models, for your XML file?
<inertial pos="-0.0112984 -3.15366e-006 0.0746835" quat="0.997071 0.000128212 0.076485 -0.00012406" mass="2.27" diaginertia="0.003962 0.00341694 0.00169212" />
Also, I notice there are tags on these github issues, or labels. Features they might be called. How do you write these?
I wanted to put a question tag. Is this the place to ask these sorts of questions? It's not about a bug.
I observed that some of my hinge joints exceed the joint limits that are specified using 'range' parameter whilst setting 'limited' flag as 'true'. What could be the possible reasons for this?
Hello, I am making a custom model, which I am converting from URDF. In the original urdf model, there are two objects which are connecting to the same child body, however mujoco transated that into one of the bodies being connected and the other one is open-ended. Is there some sort of trick to have two bodies having the same child in the kinematics tree? I am refering to psm_pitch_top_link and psm_pitch_bottom_link both being connected to psm_pitch_end_link in the attached model. Thanks!
Hi, glad to hear that Mujoco is now free and open sourced!
I am a user of OpenAI's safety gym which is built on Mujoco. The natural lidar in safety gym seems broken (can't exclude robot body parts when casting the ray to detect obstacles in the environment, resulting in false positives). This is due to Mujoco's mj_ray() issue as discussed in an old post by people at OpenAI on Mujoco's forum:
This issue so far hasn't been fixed yet. As a result, safety gym by default uses pseudo lidar instead of natural lidar. I think this issue might be worth an inspection. Thanks!
Is it possible to port the x86 binaries to Linux IBM POWER architecture?
hi,
i got a winch which which is connected to a rope, the only thing i found out till now is ,that i can control the position of the winch to the rope with the name attribute. yeah .sound strange, but if i use name="B0" , the winch is connected to the first capsule of the winch, if i use name="B10" its connected to the10th capsule (i think). But how do i connect more than one geom or body to the rope ?
Here is a gif that shows the winch that is connected to the first capsule of the rope (it seemed) and another red capsule that is NOT connected to the rope? How to connect the red-capsule to the rope ?
Here is my code:
<asset>
<texture type="skybox" builtin="gradient" rgb1="0.3 0.5 0.7" rgb2="0 0 0" width="512" height="512"/>
<texture name="texplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 0.15 0.2"
width="512" height="512" mark="cross" markrgb=".8 .8 .8"/>
<texture name="texcarpet" type="2d" file="carpet.png"/>
<texture name="texsponge" type="2d" file="sponge.png"/>
<texture name="texmarble" type="cube" file="marble.png"/>
<material name="matplane" reflectance="0.3" texture="texplane" texrepeat="1 1" texuniform="true"/>
<material name="matcarpet" texture="texcarpet"/>
<material name="matsponge" texture="texsponge" specular="0.3"/>
<material name="matmarble" texture="texmarble" rgba=".7 .7 .7 1"/>
</asset>
<option timestep="0.002" jacobian="dense"/>
<size nconmax="100" njmax="300" nstack="50000"/>
<worldbody>
<geom name="ground" type="plane" size="0 0 1" pos="0 0 0" quat="1 0 0 0" material="matplane" condim="1"/>
<body name="b_winch" pos="0 0 0.05">
<geom type="cylinder" fromto="0 0 -0.05 0 0 0.05" size="0.06"/>
<joint name="winch_0" range="-1.5708 1.5708"/>
<geom type="cylinder" fromto="0 0 -0.04 0 0 -0.05" size="0.12"/>
<geom type="cylinder" fromto="0 0 0.04 0 0 0.05" size="0.12"/>
<body name="B0" pos="0 0 0.00">
<composite type="rope" count="40 1 1" spacing="0.04" offset="0 0 2">
<joint kind="main" damping="0.005"/>
<geom type="capsule" size=".01 .015" rgba=".8 .2 .1 1"/>
</composite>
</body>
<body pos="0.5 0 0">
<geom type="capsule" size=".1 .15" rgba=".8 .2 .1 1"/>
<joint name="winch_1" range="-1.5708 1.5708"/>
</body>
</body>
</worldbody>
<actuator>
<motor name="winch_0" gear="2" joint="winch_0" />
</actuator>
thanks
I would like to express my gratitude to the contributors of MuJoCo. This issue is posted to seek advice on changing the connection relationship online.
At present, most simulation engines such as MuJoCo have defined fixed connection relationships before running, such as MJCF, URDF, etc. This limits the simulation of modular self-reconfigurable robots, which need to change the connection relationship between modules during operation, such as changing from a snake-shaped robot to a three-legged robot. In other words, the parent-child relationship, maybe also the joints, between the different links of the robot will change during the simulation, but the 3D position of the links will remain unchanged. For example, in the figure below, module 3 was originally connected to module 2. At a certain moment in the simulation, module 3 was disconnected from module 2 and then connected to module 1, but its 3D position remained unchanged.
Look forward to getting suggestions from the community. Thanks in advance.
Hi! I know this has been asked before, but is there an estimate? Or at least will it be anytime soon?
Hello,
I'm currently working on a sim-to-real project which requires a simulation of a rear-wheel driven car
on a low-friction surface (meaning the car drifts and slips a lot). I'm getting strange behavior where when turning, the car crabs
to one side, as if there was a parasitic force acting on it, as on the video. Is this a bug or is it a matter of setting simulator parameters correctly? I tried various things and nothing works. The simulation is from the Mushr tutorial. I only decreased the friction of the wheels of the car and I can't get it to work as one would expect it to.
@saran-t thank you for pointing out. I will try to fix issue at my mind with WSL. It doesnt give me enough information to go on with it so far only say that "Illegal instruction". Maybe I am missing something. Sorry for spamming this thread.
Thanks
Bilal
Originally posted by @Br3hman in #42 (comment)
I've looked at the docs and maybe I've missed it. When writing an XML file you start with the first object in the body, then add geoms to it and joints. Where do the specific positions come from to assemble joints correctly? I'm confused because Emo, the creator of MuJoCo has said that MuJoCo has not units of measure.
Do meshes function as geoms on their own, or is there a problem with the way their shape is rendered that requires new shapes in their place? I ask because I notice a lot of cubes and cylinders inside of meshes in XML model files I've seen online.
Gazebo is a popular open source tool for physics simulation and is widely used for robot simulation as well. An integration of mujoco physics with gazebo will enable the mujoco user audience to grow and consequently this will enable faster development processes (bug reporting, feature requests etc.)
Currently there is no mechanism in MuJoCo for locking (a.k.a, sleeping, freezing) degrees-of-freedom. This is important for e.g. simulating large scenes.
This could be implemented either at the level of joints, or at the level of subtrees (children of the world body).
MuJoCo should come with a canonical Python package that provides access to its C API. The package should be hosted on PyPI and installable via pip install mujoco
.
The official bindings will be developed and continuously tested alongside MuJoCo itself. When this is done, we intend to reimplement our own RL framework dm_control
on top of the new bindings.
The current plan is to create brand new bindings using pybind11.
Originally posted by Ankur-Deka November 6, 2021
I am using mujoco-py. The current approach I am using is to initialize in random states and then check for collision using a script which is similar to the following.
'''
code to initialize in random state
'''
try:
self.sim.forward()
except mujoco_py.MujocoException as e:
continue
contacts = self.get_contacts(object)
if len(contacts) > 0:
print('collision detected, try sampling a new state')
It works most of the time but once in a while it fails. The object is initialized in a collision state and gets thrown away in the scene and the snippet above doesn't detect the collision. Since I am calling sim.forward (and NOT sim.step), there shouldn't be any integration in time as per documentation and correspondingly the plate shouldn't have been thrown away. How can I avoid the object being thrown away or how can I correctly sample collision free random states using an alternate approach?
Hello folks,
Thanks so much for taking the charge to open-source mujoco. Before the source is available yet, I wonder if there is any plans to cross-compile to arm64, namely, Apple Silicon?
Thanks in advance for your help!
The link https://mujoco.org/forum/index.php doesn't seem to work anymore. Could you please make it accessible again? I found a discussion on a doubt at this link through google search only to realize that the link doesn't work anymore.
Hey,
I'm the new maintainer of Gym (I'm a PhD student at UMD, I have no formal affiliation with OpenAI). As you may know, Gym has been using MuJuCo for a long time in it's MuJuCo and Robotics environments, and was in the process of replacing these in full with Brax (originally PyBullet, but plans changed) due to MuJuCo's status as closed source and a host of massive maintenance issues with the MuJuCo environments and mujuco-py. Are you guys interested in Gym support, and if so would you be willing to reach out to me to set up a time to briefly chat about plans? My email is [email protected]
Hi,
is there any sample code how to programmatically define an mjModel: e.g. given a kinematic structure with geometric shapes (spheres, meshes, boxes, etc.), how to build the corresponding mjModel without translation into an XML file.
Best
Marc
I had bought the regular mujoco license 200 1 year ago. Today, I am getting an Invalid MIT-MAGIC-COOKIE-1 keyERROR: Expired activation key
error whenever I tried to run a python3 scripts that runs a mujoco environment.
I tried to replace the mjkey inside mujoco200/bin
to use the new and free license key. This did not work.
I tried to run sample/make in case this had some effect (it did not).
I tried to reset the computer: the same result.
After that, I thought about doing the upgrade from mujoco200 to mujcoo210 - same result.
*Note: I do not get this error if I simply run mujoco210/bin/simulate ..model_file..
I would appreciate any insight into this.
I tried uninstall mujoco_py with pip3, reinstall it, and rebuild the cython libraries to see if that has an effect. The buid finished with a ERROR: Expired activation key
and updating my PYTHONPATH
, LD_LIBRARY_PATH
, LD_PRELOAD
.
Here, I am getting the following:
python3 train_binPicking.py --render True
Invalid MIT-MAGIC-COOKIE-1 key
You appear to be missing MuJoCo. We expected to find the file here: /home/juan/.mujoco/mujoco200
This package only provides python bindings, the library must be installed separately.
Please follow the instructions on the README to install MuJoCo
https://github.com/openai/mujoco-py#install-mujoco
Which can be downloaded from the website
https://www.roboti.us/index.html
Traceback (most recent call last):
File "train_binPicking.py", line 44, in <module>
import robosuite as suite # will call all __init__ inside suite loading all relevant classes
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/__init__.py", line 1, in <module>
from robosuite.environments.base import make
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/environments/__init__.py", line 1, in <module>
from .base import REGISTERED_ENVS, MujocoEnv
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/environments/base.py", line 2, in <module>
from mujoco_py import MjSim, MjRenderContextOffscreen
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/__init__.py", line 3, in <module>
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 509, in <module>
mujoco_path, key_path = discover_mujoco()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/utils.py", line 93, in discover_mujoco
raise Exception(message)
Exception:
You appear to be missing MuJoCo. We expected to find the file here: /home/juan/.mujoco/mujoco200
This package only provides python bindings, the library must be installed separately.
Please follow the instructions on the README to install MuJoCo
https://github.com/openai/mujoco-py#install-mujoco
Which can be downloaded from the website
https://www.roboti.us/index.htm
Just to test things I renamed the mujoco210
folder as mujoco200
and uninstalled/reinstalled mujoco.py. This time there are compiler errors. I guess the latest mujco_py
is not yet compatible with mujoco_210
Invalid MIT-MAGIC-COOKIE-1 keyImport error. Trying to rebuild mujoco_py.
Compiling /media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.pyx because it depends on /media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/pxd/mujoco.pxd.
[1/1] Cythonizing /media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.pyx
running build_ext
building 'mujoco_py.cymj' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py -I/home/juan/.mujoco/mujoco200/include -I/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/numpy/core/include -I/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/vendor/egl -I/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/include -I/usr/include/python3.8 -c /media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c -o /media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/generated/_pyxbld_2.0.2.13_38_linuxgpuextensionbuilder/temp.linux-x86_64-3.8/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.o -fopenmp -w
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c: In function ‘__pyx_f_9mujoco_py_4cymj_11PyMjvFigure__set’:
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c:77676:91: error: subscripted value is neither array nor pointer nor vector
77676 | _t_1 = ((PyObject *)__pyx_f_9mujoco_py_4cymj__wrap_float_1d((&(__pyx_v_p->linewidth[0])), 0x64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3829, __pyx_L1_error)
| ^
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c: In function ‘__pyx_pf_9mujoco_py_4cymj_11PyMjvFigure_9legendoff___get__’:
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c:78316:55: error: ‘mjvFigure’ {aka ‘struct _mjvFigure’} has no member named ‘legendoff’; did you mean ‘legendoffset’?
78316 | __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ptr->legendoff); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3860, __pyx_L1_error)
| ^~~~~~~~~
| legendoffset
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c: In function ‘__pyx_pf_9mujoco_py_4cymj_11PyMjvFigure_9legendoff_2__set__’:
/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/cymj.c:78371:22: error: ‘mjvFigure’ {aka ‘struct _mjvFigure’} has no member named ‘legendoff’; did you mean ‘legendoffset’?
78371 | __pyx_v_self->ptr->legendoff = __pyx_v_x;
| ^~~~~~~~~
| legendoffset
Traceback (most recent call last):
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train_binPicking.py", line 44, in <module>
import robosuite as suite # will call all __init__ inside suite loading all relevant classes
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/__init__.py", line 1, in <module>
from robosuite.environments.base import make
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/environments/__init__.py", line 1, in <module>
from .base import REGISTERED_ENVS, MujocoEnv
File "/home/juan/python/drl/toolsuites/robosuite/robosuite/robosuite/environments/base.py", line 2, in <module>
from mujoco_py import MjSim, MjRenderContextOffscreen
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/__init__.py", line 3, in <module>
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 510, in <module>
cymj = load_cython_ext(mujoco_path)
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 105, in load_cython_ext
cext_so_path = builder.build()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 221, in build
built_so_file_path = self._build_impl()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 291, in _build_impl
so_file_path = super()._build_impl()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 244, in _build_impl
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/mujoco_py/builder.py", line 144, in build_extensions
build_ext.build_extensions(self)
File "/media/juan/sdd/python/drl/code-bases/graphs/rlkit-relational/relSuite_env/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/usr/lib/python3.8/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status
MacOS binary releases should also be available for Apple Silicon machines.
If I learn every aspect of my physical robot's eccentricities of dampening, motors, and joints at every position, is there a way to insert the physical robot's traits into the simulator? To have these discrepancies factoring in between the simulated robot's inputs and outputs?
I'm specifically thinking of getting a neural network to learn the individual, real life physical robot's position for every type of force made by the actuators and gravity, among any other forces acting on the robot's body.
In other words:
1: I want to precisely map where my physical, real life robot changes in state. What inputs to the actuators give what readings, outputs on the encoders & gyro/ accelerometers. I want these relationships mapped to the point of accurate prediction.
2: I want these unique, local to my robot only input to output discrepancies programmed into the MuJoCo simulator.
If I don't have the physical robot modelled I can't get it accurately simulated. If it's not accurately simulated I can't use MuJoCo to train it.
Also, I see other people tagging their 'issues' as question or other tags. How do you do that?
QUESTION: Is everything I need to modify the simulator in this repo?
Referring to https://roboti.us/forum/index.php?threads/how-to-simultaneously-visualize-and-render-offscreen.3517/ which was not resolved completely.
Thank you for opensourcing mujoco, it is integral to my research. I have a scene with a robot and I need to render two viewpoints, a third person free moving view of the robot(onscreen) and a view from a fixed camera attached to the robot's body(offscreen).
Could someone guide me on how to do this? I define one mjmodel, mjdata and two GLFWwindow, mjvCamera, mjvOption, mjvScene, mjrContext.
Guidance would be very much appreciated. Thanks!
I can launch simulate
in both Linux and Windows, but not basic.
The docs say of basic "It opens an OpenGL window using the platform-independent GLFW library,"
I want to access the value of the contact jacobian (J(q)) and its derivative (dJ(q,dq)) at the current state [q, dq] at a particular point on the robot and the value of contact force between these 2 contacting geoms. e.g the foot making contact with the ground. I want to add the following constraints to a qp:
How do I go about doing this?
I was wondering if we currently have something akin to the distance and collision queries supported by Bullet [1] (e.g. getContactPoints, getClosestPoints). Is there any documentation on something equivalent to that in MuJoCo or could that be a potential feature to be implemented in the future? Many thanks for the presentation at CoRL!
From the Read Me...
we are currently making preparations to open source the codebase. In the meantime, MuJoCo is available for download as a free and unrestricted precompiled binary under the Apache 2.0 license from mujoco.org.
MuJoCo's source code will be released through this GitHub repository once it is ready. In the meantime, the repository hosts MuJoCo's documentation
Why can't you just put it up now?
In case you have any thoughts I'll tell you what I want it for... My goal is to replace the torque and the output code with a neural network trained on my real life, physical robot. A neural network trained to predict the state depending on the torque and last state.
So, while I'm on the topic, any general advice how to proceed? Maybe where to begin? Like a more bite sized project before I tackle this?
Hi,
as the forums of mujoco are no longer available, we should ask here, so i do :)
I want to describe a winch model with a steel-rope with mujoco xml. But i dont know what to use for a motor-actuator as joint (hinge is wrong :) ) ? In the simulator i can use the controls of "winch_0" but it does not rotate like a motor would rotate the cylinder, the rope moves up-and-down the cylinder ?
Here is my code so far:
<mujoco model="RopeWinch">
<asset>
<texture type="skybox" builtin="gradient" rgb1="0.3 0.5 0.7" rgb2="0 0 0" width="512" height="512"/>
<texture name="texplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 0.15 0.2"
width="512" height="512" mark="cross" markrgb=".8 .8 .8"/>
<texture name="texcarpet" type="2d" file="carpet.png"/>
<texture name="texsponge" type="2d" file="sponge.png"/>
<texture name="texmarble" type="cube" file="marble.png"/>
<material name="matplane" reflectance="0.3" texture="texplane" texrepeat="1 1" texuniform="true"/>
<material name="matcarpet" texture="texcarpet"/>
<material name="matsponge" texture="texsponge" specular="0.3"/>
<material name="matmarble" texture="texmarble" rgba=".7 .7 .7 1"/>
</asset>
<option timestep="0.002" jacobian="dense"/>
<size nconmax="100" njmax="300" nstack="50000"/>
<worldbody>
<geom name="ground" type="plane" size="0 0 1" pos="0 0 0" quat="1 0 0 0" material="matplane" condim="1"/>
<body name="B0" pos="0 0 0.3">
<freejoint/>
<body>
<geom type="cylinder" fromto="0 0 -0.3 0 0 0.3" size="0.06"/>
<joint name="winch_0" type="hinge" pos="0 0 0.065" axis="0 1 0" range="-75 30" damping="5" stiffness="10" armature="0.02" />
</body>
<composite type="rope" count="40 1 1" spacing="0.04" offset="0 0 2">
<joint kind="main" damping="0.005"/>
<geom type="capsule" size=".01 .015" rgba=".8 .2 .1 1"/>
</composite>
</body>
</worldbody>
<actuator>
<motor name="winch_0" gear="200" joint="winch_0" />
</actuator>
</mujoco>`
It looks like this, where the rope goes up/down the cylinder. But the cylinder should rotate and the rope-connection-point should stay stationary.
What do i wrong ?
Hi,
I am wandering how to visualize the contact force with Cpp API. I write a xml file and include the following line into it:
<visual>
<rgba com="0.502 1.0 0 0.5" contactforce="0.2 0.98 0.2 0.8" contactpoint="1.0 1.0 0.6 0.4"/>
<scale com="0.2" forcewidth="0.05" contactwidth="0.10" contactheight="0.04"/>
</visual>
Then I use the official file "simulate.cpp" to run this xml. I found that in the "randering" section, I can turn on the contact force and visualize the contact force as an arrow. Unfortunately, I still don't know how to show this contact force in my own program. Does anyone have a clue?
Thanks!
Currently only Linux x86 binaries are available. It would be nice to have it for aarch64 architecture.
Because if you can't get the proper volume and density into your physics simulator how can you simulate it?
I was hoping to source the CAD files of parts I was going to use, assemble them all in Solidworks and simulate the model in MuJoCo? Would I have to give the make the mesh (STL) imports zero mass to bring them into MuJoCo? Real CAD Joints and motors won't fit together if they are convex hulls. RIght?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.