mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

cannot see name of a joint

Open ShahhhVihaan opened this issue 2 years ago • 11 comments

Hi, I'm a student trying to build a simulation of a quadruped leg. It's a simple model with three parts of the leg attached using two revolute joints.

I'm having some trouble simulating the urdf file that I have exported from solidworks.

I exported a urdf file from solidworks and the I converted it into a mujoco xml file using compile. The model renders perfectly okay but I cannot see the name of the second joint that is "knee_joint" in the window. Thus I cannot see the qpos. Is there a problem with my xml file? Can someone please help me fix this?

<mujoco model="2dof_leg_module_v3">
    <compiler angle="radian" meshdir="../meshes/" />
    <size njmax="500" nconmax="100" />
    <asset>
        <mesh name="hip_module" file="hip_module.STL" />
        <mesh name="upper_leg" file="upper_leg.STL" />
        <mesh name="lower_leg" file="lower_leg.STL" />
    </asset>
    <option gravity = "0 0 0"/>
    <worldbody>
        <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="0.752941 0.752941 0.752941 1" mesh="hip_module" />
        <geom type="mesh" rgba="0.752941 0.752941 0.752941 1" mesh="hip_module" />
        <body name="upper_leg" pos="0.066577 -0.011968 -0.0185">
            <inertial pos="-0.0578208 -0.0212739 -0.0555578" quat="0.640784 0.254162 0.299142 0.659781" mass="0.0942771" diaginertia="0.000160483 0.000154497 1.3996e-05" />
            <joint name="hip_joint" pos="0 0 0" axis="0 -1 0" />
            <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="0.752941 0.752941 0.752941 1" mesh="upper_leg" />
            <geom type="mesh" rgba="0.752941 0.752941 0.752941 1" mesh="upper_leg" />
            <body name="lower_leg" pos="-0.11534 -0.0324 -0.11089">
                <inertial pos="0.0478755 -0.0138956 -0.0466193" quat="0.281232 0.654101 0.648775 0.26861" mass="0.037401" diaginertia="0.000102588 0.000101714 1.74264e-06" />
                <joint name="knee_joint" pos="0 0 0" axis="0 1 0" />
                <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="0.752941 0.752941 0.752941 1" mesh="lower_leg" />
                <geom type="mesh" rgba="0.752941 0.752941 0.752941 1" mesh="lower_leg" />
            </body>
        </body>
    </worldbody>
</mujoco>

ShahhhVihaan avatar Aug 05 '22 00:08 ShahhhVihaan

Sorry, I don't understand

cannot see the name of the second joint that is "knee_joint" in the window

What window? Perhaps attach a screenshot?

yuvaltassa avatar Aug 05 '22 14:08 yuvaltassa

2dof_mujoco_testing @yuvaltassa Here's the image. I cannot see "knee_joint" on the top right.

ShahhhVihaan avatar Aug 05 '22 15:08 ShahhhVihaan

Please attach a loadable model and I will take a look. (I need the meshes. You can attach everything as a zip)

yuvaltassa avatar Aug 06 '22 12:08 yuvaltassa

@yuvaltassa 2dof_leg_mujoco.zip Here are the mesh, urdf and xml files.

ShahhhVihaan avatar Aug 09 '22 14:08 ShahhhVihaan

I see the knee joint? Screenshot 2022-08-09 at 17 04 22

yuvaltassa avatar Aug 09 '22 16:08 yuvaltassa

May I ask what version of Mujoco you are using? I am using 210.

For someone reason I cannot see it.

Also what platform are you using?

ShahhhVihaan avatar Aug 09 '22 16:08 ShahhhVihaan

I loaded this in MuJoCo 2.2.1 on an M1 Mac.

Can anyone else here replicate the OP's problem?

yuvaltassa avatar Aug 10 '22 10:08 yuvaltassa

I am having this problem in MuJoCo 2.2.1 and 210 in Ubuntu.

ShahhhVihaan avatar Aug 10 '22 18:08 ShahhhVihaan

Okay, I will try to reproduce on Ubuntu with 2.2.1

To clarify, you mean the prebuit binary, you are not building from source. Correct?

yuvaltassa avatar Aug 10 '22 19:08 yuvaltassa

I first tried the binary and later I also built it from the source.

ShahhhVihaan avatar Aug 10 '22 19:08 ShahhhVihaan

Hi!

So the good news is we can repro this. It's a very strange issue. Note that this is "solved" by opening the control tab, in which case the slider is fine but the "Clear all" button loses the text. This is reversible. Close the control tab and the joint slider goes blank. So the symptom is, the last GUI element on the RHS doesn’t get its text rendered, but only sometimes and only on Linux. We will keep looking into this. Thanks for your reproducible bug report. Leaving the issue open.

Screenshot 2022-08-11 at 09 09 09 Screenshot 2022-08-11 at 09 09 18

yuvaltassa avatar Aug 11 '22 09:08 yuvaltassa

Seems to be fixed. Probably by some GLFW update.

nimrod-gileadi avatar Apr 20 '23 14:04 nimrod-gileadi