I am trying to recalculate the joint space inertia matrix (mjData.qM) on my own, and running into difficulties trying to match it. For a simple two-link arm, I'm calculating it as

qM = sum_i (J_i^T * M_i * J_i)

where J_i is the Jacobian for the COM of the arm segment i (mj_jacBodyCom) and M_i is the inertia matrix of the arm segment (diag(body_mass, body_inertia])).

I'm wondering if I need to be rotating the inertia matrix for the arm segment from it's diagonal form before doing...

Calculating joint space inertia matrix]]>

I am wondering whether it is possible to add actuators directly to mjData in the cpp file instead of adding them to the loaded MJCF file?

Thanks,

Zohar]]>

I am trying to better understand the actuation model in Mujoco, and I am specifically referring to this section of the documentation:

View attachment 552

Apologies if I am missing something obvious, but I have some trouble understanding Li, grad_Li and Li_dot (what they mean, and the difference between them).

Here is my understanding/ confusion regarding those quantities:

1) Li is the length or position of the actuator (from...

Understanding Li, Li_dot and grad_Li]]>

I read in the documentation that this might be possible by making the impedance parameter of the constraint solver position dependent but I...

Modeling contacts on soft skin]]>

For example, if the end of two capsule contact, then this two capsule are connected together.

]]>

I am new to MuJoCo and I am trying to control a robot model that I made with the Schunk 3-finger hand. I am controlling the joint positions using mujoco-py interface similar to the script shown here. I continuously increase the joint values in every simulation step. I see the following results (video is attached), which do not respect collision constraints and the robot penetrates itself.

What is...

Robot does not respect collision constraints while being controlled with position actuators.]]>

In the old python bindings for mujoco 1.3 it is possible to do this conversion by obtaining the GL_MODELVIEW_MATRIX and GL_PROJECTION_MATRIX from python OpenGL like this and then computing the conversion manually.

However in the new mujoco 1.5 bindings, python OpenGL is not used anymore and...

Converting between Screen Coordinates and World Coordinates]]>

I would like visualize cartesian forces (external perturbations, I somehow generate to test controllers etc.) on bodies in the simulation with an arrow similar to the contact force visualization. How can I achieve this? I assume, I could use

Best...

Visualize programmed perturbations]]>

And get a SyntaxError when running:

pip install -U 'mujoco-py<1.50.2,>=1.50.1'

I have attached the full output of the error to this thread. What am I doing wrong?]]>

I'm getting unstable contacts when using heightfields with small robots (30cm). The robot shivers

when in contact with the height field. I reduced the margin to a very small number and this helps somewhat,

but I'm still getting moments where the leg goes through the floor and the whole thing blows up and flings the robot

up in the air, completely messing up the reinforcement learning procedure.

Any advice on how to set the simulation parameters? I've attached an XML that I'm using....

Unstable simulations when using height field]]>

I am trying to recalculate the joint space inertia matrix (mjData.qM) on my own, and running into difficulties. For a simple two-link arm, I'm calculating it as

qM = sum_i (J_i^T * M_i * J_i)

where J_i is the Jacobian for the COM of the arm segment i (mj_jacBodyCom) and M_i is the inertia matrix of the arm segment (diag(body_mass, body_inertia])).

I'm wondering if I need to be rotating the inertia matrix for the arm segment from it's diagonal form before doing...

Calculating the joint space inertia matrix]]>

Since I don't know how to access mj_fullM() through python, are there any documentation about how the function mj_fullM() works internally?

Really appreciate your help!!]]>

It seldom happens, like once a 100k steps, so it is difficult for me to spot the problem.

Can you give some possible reasons for this error?]]>

Is there any way to prevent such a object penetration?]]>

Attached a simple cube.stl as an example.]]>