Giter Club home page Giter Club logo

mujoco_menagerie's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mujoco_menagerie's Issues

Finger tip positions

Hello, for E3M5 hand model, How can I extract the cartesian positions of finger tips?
xanchor gives me the joints positions but, I also need the fingertips positions.

Grading System Question

Hi team -- this seems like a great addition. I was wondering how you came up with the grading system. Do you compare sim2real on publicly accessible data? I'm interested from just a model-learning for control perspective.

I think releasing the grading system and data would be of interest to the community 🤗! Thanks!

Stepping simulation changes robot configuration

Which model is the issue affecting? Franka Emika Panda

What is the issue? I load the scene in Python (using the mujoco.MjModel.from_xml_path function) and then change the arm configuration (set qpos) to some default/home position (see figure 1). Then, if I step the simulation (mujoco.mj_step) multiple times, without changing anything or without sending controls to actuators, the robot configuration changes to figure 2. I then try to send zero controls + qfrc to the actuators to keep the robot still, but I can't seem to actuate the arm either:

 for i, joint_name in enumerate(self.joint_names):
     qfrc = self.data.joint(joint_name).qfrc_bias
     self.data.actuator(f'actuator{i+1}').ctrl = qfrc + controls[i]

image

image

The fact that the arm moves upwards seems strange, I would expect gravity to pull the robot down instead.
Is this a problem with the model or something wrong on my side? Did you try actuating the specific model?

General Question about the reference position of joints

Hi,

Thank you for the work you're doing to add models to this menagerie.

I have a question regarding one of attribute in some models. I tried loading the cassie model (agility_cassie/scene.xml) in mujoco simulator and realized that some joints position q, when loading the model, were not 0.
And when i checked the model xml (agility_cassie/cassie.xml), there is a ref attribute in some of the joints. For instance, the knees :
<joint name="left-knee" type="hinge" ref="-45" range="-164 -37" damping="1" armature="0.09344"/>

I read the documentation about this, and i don't really understand what it represent and why it needs to be added. Could you explain it with a bit more detail, please ?

Thank you in advance or your answer,

Add a separate hand model for Franka Panda

Currently the Franka arm is available in a a full and no hand model. It would be useful to have the hand only model.
Especially, it will be easier to use it with dm_control manipulation task that expects a separate arm and hand model.

Here is my first attempt, but not sure whether the contact and the pos information are correct

<mujoco model="panda_hand">
  <compiler angle="radian" meshdir="assets" autolimits="true"/>

  <option integrator="implicit"/>

  <default>
    <default class="panda">
      <material specular="0.5" shininess="0.25"/>
      <joint armature="0.1" damping="1" axis="0 0 1" range="-2.8973 2.8973"/>
      <general dyntype="none" biastype="affine" ctrlrange="-2.8973 2.8973" forcerange="-87 87"/>
      <default class="finger">
        <joint axis="0 1 0" type="slide" range="0 0.04"/>
      </default>

      <default class="visual">
        <geom type="mesh" contype="0" conaffinity="0" group="2"/>
      </default>
      <default class="collision">
        <geom type="mesh" group="3"/>
        <default class="fingertip_pad_collision_1">
          <geom type="box" size="0.0085 0.004 0.0085" pos="0 0.0055 0.0445"/>
        </default>
        <default class="fingertip_pad_collision_2">
          <geom type="box" size="0.003 0.002 0.003" pos="0.0055 0.002 0.05"/>
        </default>
        <default class="fingertip_pad_collision_3">
          <geom type="box" size="0.003 0.002 0.003" pos="-0.0055 0.002 0.05"/>
        </default>
        <default class="fingertip_pad_collision_4">
          <geom type="box" size="0.003 0.002 0.0035" pos="0.0055 0.002 0.0395"/>
        </default>
        <default class="fingertip_pad_collision_5">
          <geom type="box" size="0.003 0.002 0.0035" pos="-0.0055 0.002 0.0395"/>
        </default>
      </default>
    </default>
  </default>

  <asset>
    <material class="panda" name="white" rgba="1 1 1 1"/>
    <material class="panda" name="off_white" rgba="0.901961 0.921569 0.929412 1"/>
    <material class="panda" name="black" rgba="0.25 0.25 0.25 1"/>
    <material class="panda" name="green" rgba="0 1 0 1"/>
    <material class="panda" name="light_blue" rgba="0.039216 0.541176 0.780392 1"/>

    <!-- Collision meshes -->
    <mesh name="hand_c" file="hand.stl"/>

    <!-- Visual meshes -->
    <mesh file="hand_0.obj"/>
    <mesh file="hand_1.obj"/>
    <mesh file="hand_2.obj"/>
    <mesh file="hand_3.obj"/>
    <mesh file="hand_4.obj"/>
    <mesh file="finger_0.obj"/>
    <mesh file="finger_1.obj"/>
  </asset>

  <worldbody>
    <light name="top" pos="0 0 2" mode="trackcom"/>
    <body name="link8" pos="0 0 0.107">
      <body name="hand" quat="0.9238795 0 0 -0.3826834">
        <inertial mass="0.73" pos="-0.01 0 0.03"
            diaginertia="0.001 0.0025 0.0017"/>
        <geom mesh="hand_0" material="off_white" class="visual"/>
        <geom mesh="hand_1" material="black" class="visual"/>
        <geom mesh="hand_2" material="black" class="visual"/>
        <geom mesh="hand_3" material="white" class="visual"/>
        <geom mesh="hand_4" material="off_white" class="visual"/>
        <geom mesh="hand_c" class="collision"/>
        <body name="left_finger" pos="0 0 0.0584">
          <inertial mass="0.015" pos="0 0 0"
              diaginertia="2.375e-6 2.375e-6 7.5e-7"/>
          <joint name="finger_joint1" class="finger"/>
          <geom mesh="finger_0" material="off_white" class="visual"/>
          <geom mesh="finger_1" material="black" class="visual"/>
          <geom mesh="finger_0" class="collision"/>
          <geom class="fingertip_pad_collision_1"/>
          <geom class="fingertip_pad_collision_2"/>
          <geom class="fingertip_pad_collision_3"/>
          <geom class="fingertip_pad_collision_4"/>
          <geom class="fingertip_pad_collision_5"/>
        </body>
        <body name="right_finger" pos="0 0 0.0584" quat="0 0 0 1">
          <inertial mass="0.015" pos="0 0 0"
              diaginertia="2.375e-6 2.375e-6 7.5e-7"/>
          <joint name="finger_joint2" class="finger"/>
          <geom mesh="finger_0" material="off_white" class="visual"/>
          <geom mesh="finger_1" material="black" class="visual"/>
          <geom mesh="finger_0" class="collision"/>
          <geom class="fingertip_pad_collision_1"/>
          <geom class="fingertip_pad_collision_2"/>
          <geom class="fingertip_pad_collision_3"/>
          <geom class="fingertip_pad_collision_4"/>
          <geom class="fingertip_pad_collision_5"/>
        </body>
      </body>
    </body>
  </worldbody>

  <!--contact>
    <exclude body1="link7" body2="link8"/>
  </contact -->

  <tendon>
    <fixed name="split">
      <joint joint="finger_joint1" coef="0.5"/>
      <joint joint="finger_joint2" coef="0.5"/>
    </fixed>
  </tendon>

  <equality>
    <joint joint1="finger_joint1" joint2="finger_joint2" solimp="0.95 0.99 0.001" solref="0.005 1"/>
  </equality>

  <actuator>
    <!-- Remap original ctrlrange (0, 0.04) to (0, 255): 0.04 * 100 / 255 = 0.01568627451 -->
    <general class="panda" name="actuator8" tendon="split" forcerange="-100 100" ctrlrange="0 255"
        gainprm="0.01568627451 0 0" biasprm="0 -100 -10"/>
  </actuator>

  <keyframe>
    <key name="home" qpos="0.04 0.04"
        ctrl="255"/>
  </keyframe>
</mujoco>

The result

Capture d’écran 2022-10-14 à 09 48 20

Add the new model of Unitree Go2

If you would like to see a new model added to the Menagerie collection, please provide us with the following information before sending a pull request. (Ideally, before you start working on converting or tuning the model for MuJoCo.)

URL for the existing model source (e.g. URDF): [https://github.com/unitreerobotics/unitree_ros/tree/master/robots](Unitree Go2)

License terms of the upstream model: BSD 3-Clause License

What do you think is required to convert and tune this model for MuJoCo?: Go2 is a new version of Go1 that has been imrpoved.

Are you proposing to help develop and maintain the new model?

Setting qpos does not take it to the same configuration

Which model is the issue affecting?

I have tested this with both UR5e and UR10e.

What is the issue?

I set certain control values from the right panel and then save the qpos values.

When I set the same qpos value in ctrl, the robot pose it off by a little bit from that value (about 0.01m in z which is about 10mms).
This is from one of pose of one of the bodies in the UR robot.

Also, the same if I set the same value for data.qpos and data.ctrl.

Below is an example.

import mujoco.viewer


def get_body_pos(body_name):
    body_id = model.body(body_name).id
    body_pos = data.xpos[body_id]
    body_qpos = data.xquat[body_id]
    return body_pos, body_qpos


if __name__ == '__main__':
    model_name = 'mujoco_menagerie/universal_robots_ur5e/scene.xml'

    model = mujoco.MjModel.from_xml_path(model_name)
    data = mujoco.MjData(model)


    def key_callback(keycode):
        if keycode == 32:
            print(data.qpos)
            print(get_body_pos('wrist_3_link'))
        if keycode == 257:
            data.ctrl = [-4.83791, -1.64282974, -1.61030469, -1.32219651, 0.87980056, -2.01056]


    with mujoco.viewer.launch_passive(model, data, key_callback=key_callback) as viewer:
        # viewer.cam.lookat[:] = [-0.1094871, 0.6, 0.0579871]
        while viewer.is_running():
            mujoco.mj_step(model, data)
            viewer.sync()

So, I run the above script

  • Move the robot around to a configuration using the right panel
  • Press space bar to output the qpos and body position of wrist_3_link
  • I modify the code to put the previous qpos in the data.ctrl part
  • I press enter to move the body to data.ctrl value
  • I output the qpos and pose of the wrist_3_link

These are the values for one of the samples.

First line is original. Second is from setting the original qpos into the model.

QPos

q1 q2 q3 q4 q5 q6
-4.83791 -1.64283 -1.6103 -1.3222 0.879801 -2.01056
-4.83790995 -1.65224 -1.61818 -1.32497 0.879982 -2.01056
-5E-08 0.009413 0.00787 0.002769 -0.00018 -1E-08

Body position

x y z
0.49835338 -0.19795 0.556927
0.50175702 -0.19838 0.547905
-0.00340364 0.000429 0.009022

q2 seems to control the height and it makes sense that the error there causes the z to also have an error.

I am using dm_control.suite.base which uses only ctrl so the example is to show that.

Any insight into why this happens and what I can adjust in the model to fix it? I did try to play around with control parameters but it doesn't seem to work for everything from here

<general biastype="affine" ctrlrange="-6.2831 6.2831" gainprm="5000" biasprm="0 -5000 -500"/>

When I did the same with google robot test, the errors are 2e-8.

Minimal pick up task using the Franka Panda arm not working as expected

Hi,

I am trying to create a minimal pick-up a box object simulation using the Franka arm in Python. I have managed to do it using the gymnasium Franka arm (kitchen_franka).

Here's my code and the assets.
Here's the output video:

vid1.mp4

However, when I tried to do the same thing with the menagerie Franka arm, it could not lift up the box object.
Here's my code and the assets.
Here's the output:

vid2.mp4

I saw a few posts with a similar issue (this, this). However, I was not able to solve it in my implementation.

Any help is appreciated. Thank you.

Loading Cassie model into Brax

Which model is the issue affecting?
agility_cassie

What is the issue?
When I use the code:

from brax.io import mjcf
path = '~/agility_cassie/scene.xml'
sys = mjcf.load(path)

it returns such error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/icepomelo/.local/lib/python3.10/site-packages/brax/io/mjcf.py", line 512, in load
    mj = load_mjmodel(path)
  File "/home/icepomelo/.local/lib/python3.10/site-packages/brax/io/mjcf.py", line 506, in load_mjmodel
    mj = mujoco.MjModel.from_xml_string(xml, assets=assets)
ValueError: XML Error: Schema violation: unique element 'inertial' found 2 times

Element 'body', line 0`

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?
I looked up the model to find the duplicate 'inertial' define for the model but I did not find anything. How to fix such issue? Thanks in advance!

Simulation Stability and Tuning Model Controllers

This is not explicitly a bug but rather a question that likely belongs in a discussion section.

Which model is the issue affecting?
Franka Emika Panda, UFactory Lite6

What is the issue?
I am attempting basic pick and place behaviours in an object manipulation benchmark that leverages MuJoCo. I am struggling to run reliable control on existing models. Thus far I have attempted to configure physics time stepping (here) & control time stepping (here) as well as the actuator settings for the above robots. I am directly controlling the robots by passing joint targets to robot actuator models, I have mostly tested with direct position controllers but plan to attempt using PD controllers.

I wished to ask what is the best practice in this situation. Should I fix my sim step and control step and then tune controllers to this? If I am tuning controllers is it expected to perform this tuning manually or does there exist and open-source package for MuJoCo that provides automated tuning.

My current set of code can be found here. To reproduce what I am observing the following is required:

  • System installation of poetry
  • Clone repo and submodules (Note: the following submodules can be removed vcp, ros2_robotics_research_toolkit, transporter_networks)
  • Install poetry env with poetry install
  • Run the following script python transporter_network_data_generation.py

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?
I am happy to create a simpler reproducible example. I am mostly looking for advice that will help fast track my resolution of this issue. Thanks for open-sourcing this software.

Control Input GO1

Dear Developers Menagerie,

Could you please tell me what is the actual control signal for the go1 model? For me is not clear if the control input is torque or angle joint angles.

In case the control input is Q_POS (Joint angles), does it means that I can embed a PD controller in the simulator to follow the given control reference? if this is the case, can you tell me how to configure the controller for the joints?

Thanks for your time

Best,

Jose Luis

New model Crazyflie2

If you would like to see a new model added to the Menagerie collection, please provide us with the following information before sending a pull request. (Ideally, before you start working on converting or tuning the model for MuJoCo.)

URL for the existing model source (e.g. URDF): ROS2 stack

License terms of the upstream model: MIT

What do you think is required to convert and tune this model for MuJoCo?: To add more quadrotor implementation in MuJoCo

Are you proposing to help develop and maintain the new model?: I have implemented a prototype model here. There is still some testing to be completed w.r.t this prototype

Is it possible to provide example code for usage?

Hello, great models provide which can help a freshman to use Mujoco !

And I am curious about that is it possible to provide the code to implement the videos shown in YouTube

This will help me a lot to use Mujoco better!

Thank you~

about mujoco model

Hello, your shadow_hand model needs mujoco 2.2.2 or later, but mujoco-py is only updated to version 2.1, so I would like to ask how to import your model into mujoco and drive this model

Robot Arms + Hands Coming Soon?

Hi folks,

I'd like to know if there are plans to add a Robot Arms + Hands section to the repository?

(e.g. xArm7 + Shadow E3M5, Panda + Allegro V3, etc.)

I ask because i'd like to contribute to this effort, and am wondering if any authors of the library have this as part of the Menagerie's development roadmap?

CC: @kevinzakka , in case you might know : )

unitree_g1 issue

Which model is the issue affecting?
unitree_g1
What is the issue?
When I run
python -m mujoco.viewer --mjcf mujoco_menagerie/unitree_g1/scene.xml
this happens:
XML Error: Schema violation: unrecognized attribute: 'ellipsoidinertia'
Element 'global', line 0

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?
Run on a Ubuntu 20.04 system, with Python 3.10

How to add multiple instances of the same robot?

Hi,
I would like to have a bimanual setup consisting of two franka emika panda robots. What do you think the best way is to do this without getting a repeated names error? I think I should add a prefix or a namespace but I don't know how I can do it easily. I would be glad if you could guide me.
Thanks in advance.

Kind reminder for addressing the issue #40

Hello dear members of the Google DeepMind Team,

I hope you and everyone in your family are all well and healthy! I am making this new issue as a kind reminder of addressing my previews issue #40 which is a reopening of the older issue #37 which I did not marked as closed myself. I would greatly apricate your feedback and your help and support are valuable for the continuation of my teams project.

I am always at your disposal for any further queries regarding issue #40!

Thank you very much in advance for your valuable help and support!!!

Kind regards,

Christos Peridis

Version compatibility issue

Which model is the issue affecting?

UR5e and Panda.

What is the issue?

In UR5e and Panda, implicitfast integrator is used. However, it is a new feature of MuJoCo introduced in version 2.3.3, which is much newer than the prerequisite version (2.2.2). So, README needs to be updated to reflect this change of the integrator.

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?

Unitree models falling backwards

First of all,

thanks a lot for the models!! It is a great addition to the robotics and RL community.

I recently started using the Unitree Go1 model with the Python Mujoco viewer, but every time I render the model, the robot falls backward.

Do you have any initial pos configuration that I can use to replicate the stable standup position shown in the demo?

thanks a lot for your help

Trying to create a UR10 model -- visual orientations are wrong

Hi. I am trying to create a UR10e model by following the steps in https://github.com/deepmind/mujoco_menagerie/blob/main/universal_robots_ur5e/README.md. However, when I load the model, visuals are not in the correct orientation. Below is a screenshot of the model:

ur10_1
ur10_2

I thought maybe I have missed a step while converting from DAE to OBJ in Blender, and I realized that the rotation is not [0, 0, 0] when I imported DAE files (but [90, 0, -180]). So I have changed them to [0, 0, 0] and re-converted the files. Visuals have changed, but they are still incorrect:

ur10_3
ur10_4

I think the only difference between ur5e and ur10e should be their sizes and lengths, not orientations. I uploaded my changes to a repo if you want to check it: https://github.com/alper111/ur10e_mujoco. Files that are converted with [90, 0, -180] rotation are in assets, and with [0, 0, 0] rotation are in assets2. There may be some other issues such as colors/Kp values and so on, but they are not relevant at the moment.

Blender: Version 3.4.1 (2022-12-20)
Mujoco: Version 2.3.1
System: macOS Ventura 13.1
Architecture: arm

New Model Spot

If you would like to see a new model added to the Menagerie collection, please provide us with the following information before sending a pull request. (Ideally, before you start working on converting or tuning the model for MuJoCo.)

URL for the existing model source (e.g. URDF) RS_Description

License terms of the upstream model BSD 3-Clause License

What do you think is required to convert and tune this model for MuJoCo?

Are you proposing to help develop and maintain the new model? I wanted to learn how to use the MJCF format, so I created a first version based on the urdf and inspired by the structure of the Anymal C xml file. I'm having a problem with the texture, Spot appears yellow where it shouldn't. If you know how to solve this problem, I'd really appreciate hearing your suggestions. And if there are any other problems, I look forward to hearing about them too!

Barkour contact parameters

This model might be missing the impratio setting which is important to allow soft foot contact but limit slipping. The other quadrupeds set it to 100. I also noticed the solimp="0.015 1 0.031" line is setting the d_width (compression distance) to 31mm which I think is bigger than Barkour's foot.

<geom type="sphere" size="0.0175" pos="-0.21425 -0.0779806 0" rgba="1 0 0 1" solimp="0.015 1 0.031" friction="0.8 0.02 0.01"/>

Reference:

<option cone="elliptic" impratio="100"/>

Query on Differences in Motor Properties Between Mujoco XML and MJX Variants

Which model is the issue affecting?

go2

What is the issue?

I've noticed that the motor properties for the Mujoco XML and its MJX variant differ. For instance, in go2.xml, the motor is defined as <motor ctrlrange="-23.7 23.7"/>. However, in go2_mjx.xml, the motor is specified as <general forcerange="-24 24" biastype="affine" gainprm="50 0 0" biasprm="0 -50 -0.5"/>, which includes extra bias and gain terms.

I'm curious about the reasons behind this design choice in the MJX version. Can we revert to the original motor settings? Are the gainprm and biasprm values derived from hardware specifications, or are they introduced solely for simulation stability and performance?

I am planning to deploy a model trained with the MJX settings, so this discrepancy is significant for me.
Any information would be highly appreciated. Thank you in advance!

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?

The file are go2.xml and go2_mjx.xml.

Add TALOS Humanoid Robot from PAL Robotics

URL for the existing model source (e.g. URDF)

TALOS URDF: https://github.com/pal-robotics/talos_robot/tree/kinetic-devel/talos_description/robots

License terms of the upstream model

TALOS will be with Apache License 2.0

What do you think is required to convert and tune this model for MuJoCo?

Being able to convert from the URDF to MuJoCo using the compile command
We need to add the actuators to the model for better joint actuation
Stability of the model w.r.t to the actuator's gain tuning

Are you proposing to help develop and maintain the new model?

Yes, we can develop and help maintain the new model. It is in our interest as a part of the @pal-robotics team.

MJX model versions

Which model is the issue affecting?

All model releases (in particular those models containing features that are supported in mujoco but not mujoco-mjx).

What is the issue?

It would be nice if model releases include mjx compatible versions. Models that contain tendons for instance are not supported in mjx, right now users have to alter published models containing tendons to use them with mjx, it would be nice if there was official support for mjx compatible models.

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?

I have been trying to use the robotiq_2f85 model with mjx but I have encountered the following error:

 File "/home/peter/.cache/pypoetry/virtualenvs/mujoco-robot-environments-hs2qeFWj-py3.10/lib/python3.10/site-packages/mujoco/mjx/_src/io.py", line 69, in put_model
    raise NotImplementedError('tendons are not supported')
NotImplementedError: tendons are not supported

Update: my bad I see that tendons will be supported in future, maybe the main thing is to wait for feature parity. Although there are other important considerations like the integrator and collision geometries for which it may be worth supporting another file for mjx.

panda(model)can't grab things firmly.

Hi,

I'm a student and I'm trying to use MuJoCo for master's thesis research.
I have a question about frank_emika_panda.

Even with condim=3 and friction enabled, when I grab the box and move the robot arm, it drops the box. It looks and feels like the arm's grip is not strong enough.
Finally, I tried to grab the sphere (adapter) at the end of the cable.

Coded scene.xml with cables and boxes added.

<mujoco model="panda scene">

  <include file="panda.xml"/>

  <statistic center="0.3 0 0.4" extent="1"/>
  <extension>
    <required plugin="mujoco.elasticity.cable"/>
  </extension>

  <visual>
    <headlight diffuse="0.6 0.6 0.6"  ambient="0.3 0.3 0.3" specular="0 0 0"/>
    <rgba haze="0.15 0.25 0.35 1"/>
    <global elevation="-30"/>
  </visual>
  <size nconmax="5000" njmax="10000"/>
  
  <option>
      <flag multiccd="enable"/>
  </option>

  <asset>
    <texture type="skybox" builtin="gradient" rgb1="0.3 0.5 0.7" rgb2="0 0 0" width="512"
        height="3072"/>
    <texture type="2d" name="groundplane" builtin="checker" mark="edge" rgb1="0.2 0.3 0.4"
        rgb2="0.1 0.2 0.3" markrgb="0.8 0.8 0.8" width="300" height="300"/>
    <material name="groundplane" texture="groundplane" texuniform="true" texrepeat="5 5"
        reflectance="0.2"/>
  </asset>

  <worldbody>
    <light pos="0 0 1.5" dir="0 0 -1" directional="true"/>
    <geom name="floor" size="0 0 0.05" type="plane" material="groundplane"/>
    <composite type="cable" curve="s" count="41 1 1" size="1.5" offset="-1 0.3 .01"  initial="none">
      <plugin plugin="mujoco.elasticity.cable">
        <!--Units are in Pa (SI)-->
        <config key="twist" value="1e3"/>
        <config key="bend" value="1e4"/>
      </plugin>
      <joint kind="main" damping=".001"/>
      <geom type="capsule" size=".004" rgba=".8 .2 .1 1"  friction=".1" condim="3"/>
    </composite>
    <body name="adapter" pos=".5 0.3 .01">
      <geom type ="sphere" size=".0055 "  friction=".1" condim="3"/>
      <freejoint/>
    </body>
    <body name="box" pos=".5 0 .1">
      <geom type ="box" size=".01 .01 .01 " friction=".1" condim="3"/>
      <freejoint/>
    </body>
    <!--<body name="socket" pos="1 0.3 .1">
      <geom type="box" size="0.05 0.05 0.05" margin=".02" gap=".01" rgba=".1 .8 .2 1" contype="2" conaffinity="2"/>
    </body>-->
    <!--<body name="box1" pos="0.1 0.3 .1" zaxis="0 0 1">
      <geom type="box" size="0.05 0.05 0.05"  group="1" condim="3"/>
    </body>
    <body name="box2" pos="0.5 0.3 .1" zaxis="0 0 1">
      <geom type="box" size="0.05 0.05 0.05"  group="1" friction=".1" condim="3"/>
    </body> -->
  </worldbody>
  <equality>
    <connect name="right_boundary" body1="B_last" body2="adapter" anchor=".0376 0 0"/>
  </equality>
  <contact>
    <exclude body1="B_last" body2="adapter"/>
  </contact>>

</mujoco>

shadow left hand metacarpal joint is wrong

The axis of metacarpal is wrong.
Should be:

<default class="metacarpal">
  <joint axis="0.573576 0 -0.819152" range="0 0.785398"/>
  <position ctrlrange="0 0.785398"/>
</default>

before:
image

after:
image

Franka Emika - Force Ranges

Which model is the issue affecting?
Franka Emika Panda.

What is the issue?
I think the force ranges on actuators might be incorrect (or my understanding of the actuator model is incorrect), leading to unrealistic velocities. it looks like some of the values are set to torque limits from the following spec, should these not be set to force limits? Should the actuator output range be defined in terms of max torque?

Update: the following snippet from the docs leads me to believe that force and torque are synonymous for joints:

The joint and tendon transmission types act as expected and correspond to the actuator applying forces or torques to the target object.

In this sense, if I say the torque limit of my arm is xNm, the max force is xN. I guess I was getting confused over the fact that torque measured in Nm can mean different things in terms of force depending on the length being considered. Of course in this case the SI unit measurement where r=1 is considered and the force is simply xN.

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?
Franka Emika Spec Sheet
Current Model
Screenshot 2023-11-29 at 12 03 54

@SaeidSamadi

General questions about model creation

Hi, I'm a beginner with Mujoco. I am trying to build a constant speed conveyor belt as realistic as possible to build a simulation for a robotics startup that I'm working for. I'm lost. How do you proceed to build models from scratch ? Do I need to learn how to work with a CAD like software ? Any recommendation of a free software for linux users ? Should I read mechanical and electronics specs from manufacturers ? Do you usually write the XML file line by line following the MJCF's grammar ? Or do you generate it with some external tool ?

My background is mainly in computer science and mathematics. I guess I also need some knowledge in mechanical engineering and electronics, right ? Could you kindly point me to some learning resources, please ?

Thanks in advance

Add WidowX

If you would like to see a new model added to the Menagerie collection, please provide us with the following information before sending a pull request. (Ideally, before you start working on converting or tuning the model for MuJoCo.)

Given recent work from Google like the Open X Embodiment dataset, it would be cool to try policies entirely in simulation. Given my personal workflow is primarily in Brax as opposed to the Gazebo (the native deployment of interbotix), it would be cool to have this integrated.

URL for the existing model source (e.g. URDF)
https://github.com/Interbotix/interbotix_ros_manipulators/tree/main/interbotix_ros_xsarms/interbotix_xsarm_descriptions/urdf

License terms of the upstream model
BSD 3-Clause License

What do you think is required to convert and tune this model for MuJoCo?
You'd have to run the model through argument substitution using ROS's xacro module.

Are you proposing to help develop and maintain the new model?
Sure

Force/Torque Sensor!

Hey there, as it is known, ur5e has FT sensor at its six axis. I added FT sensor by using body/ site of the sixth axis, sensor/ force and sensor/ torque of that site. Then, when I mount the robotiq's gripper, it takes the gripper force (i.e. weight) into consideration. Is there any way I can overcome this weight and calibrate the sensor to start zero?

Add TIAGo and TIAGo++ Robot from PAL Robotics

URL for the existing model source (e.g. URDF)

TIAGo URDF : https://github.com/pal-robotics/tiago_robot/tree/kinetic-devel/tiago_description/robots
TIAGo++ URDF: https://github.com/pal-robotics/tiago_dual_robot/tree/kinetic-devel/tiago_dual_description/robots

License terms of the upstream model

Both TIAGo and TIAGo++ will be with Apache License 2.0

What do you think is required to convert and tune this model for MuJoCo?

  • Being able to convert from the URDF to MuJoCo using the compile command
  • We need to add the actuators to the model for better joint actuation
  • Stability of the model w.r.t to the actuator's gain tuning
  • Taking into account the existing issue with the repeated naming in the MuJoCo

Are you proposing to help develop and maintain the new model?

Yes, we can develop and help maintain the new model. It is in our interest as a part of the @pal-robotics team.

Contributing to model system identification suggestions

Hello! Thanks for taking the initiative to consolidate a set of high-quality models for mujoco! In our research lab, we have the physical models for the panda, ur5e, and robotiq gripper. Are there any recommended experiments for system ID that we could do to contribute to improving the current quality of these models?

[Request] use a versioning system for the robot models

From what I can tell, some models like the shadowhand have been changed without any versioning indication of such a change, it would be important for reproducibility to include a versioning system for new changes.

Here is a proposal for versioning system

changes that do not modify the behavior of the model like "Cleanup XML files" should not require a new version

simple versioning system

  • *-v0
  • *-v1
  • *-v2
  • *-v3
    (good for infrequent changes)

semantic versioning system

  • *-v0.0.0
  • *-v1.0.0
  • *-v1.0.1
  • *-v1.0.2
  • *-v1.0.3
  • *-v1.1.0

in either case, the README of each model should indicate the changes in a # version history section

Note: technically, it is not a requirement for all the environments to use the same versioning system. But it would be preferable
Note: for existing models, you can keep the name but update it with a versioning system when an update is made

Thanks!

Attaching the RobotIQ 2f85 gripper to the UR10e robotic arm (Reopen of issue #37)

With 2f85 gripper

When combing the tow xml files for the UR10e and the 2f85 gripper, the 2f85 gripper appears to be glitching in the simulation.

Hello dear @kevinzakka,

I hope you and everyone in your family are all well and healthy !!! I am also wishing a happy New Year !!! All the best for you and your family, but most importantly Good Health, Love and Happiness!!! I am creating this new issue as a continuation of the original #37 that I had opened. I do apologise for my late response, however my works on the project had been postponed due to the Christmas Break. I have tested the .xml file you supplied me with and describes the integration model of the UR5e robotic arm and the 2f85 gripper, with the script I have developed. Initially I received an error regarding the setting of 'kv' parameter under the 'default class position' inside the tag 'position'. The system was not able to recognise the parameter kv, so I deleted it. I am using MuJoCo version 2.3.3. After applying the abovementioned change in the supplied xml file, I was able to run it with my Python script. However, I did not get the behaviour I was expecting from the script. Initially it start working as expected, slowly closing and opening the gripper fingers. After a while though, it starts making very abrupt movements, and the fingers remain mostly in a semi-open-closed position, while it looks like it rotates the last actuator of the robotic arm, despite me specifically controlling the actuator that is responsible for the gripper fingers. I achieve this functionality by selecting the actuator with the id that matches the desired name given to the actuator, in this case the name is 'finger_actuator. I am providing videos of the runs for the tow xml files run by my manipulation script. One video for the xml you have provided me with, and implements the integration of the UR5e with the 2f85 gripper, and one vide with the xml I have developed and implements the UR10e integration with the 2f85 gripper.

UR10e_2f85_gripper_manipulationscript_02.mp4
UR5e_2f85_gripper_manipulation_script_02.mp4

I am also uploading the gripper manipulation script that I have developed.

ur5e_2f85_gripper.zip

I have also further compered the two xml files, especially in the part of the code where the attachment of the two bodies happen through the attachment site.

image

The main differences that I can spot is the existence on extra site in the ur5e _2f85 combo which is called 'wrist_3_joint, and the creation of a body with name 'attachment', where in my implementation the extra site regarding the wrist 3 does not exist, and I directly attach the base mount of the gripper on the site 'attachment_site' itself, without making an attachment body. Further differences regarding the structure of the two xml files are that, where possible, I created separate tags for the UR10e and the 2f85. For example I have created two different 'asset' tags, one for the UR10e and one for the 2f85. Furthermore, in the default section I have created a "mother_class" called 'ur10e_2f85' which includes the two separate subclasses called 'ur10e' and '2f85' respectively.

I thank you very much in advance dear @kevinzakka for your valuable help and support!!!

Kind regards,

Christos Peridis

General question about creating an MJCF file

I want to create an MJCF file for my bipedal robot that I designed in Onshape. I used the onshape-to-robot tool to obtain the URDF file for the robot. From what I understand, I need to manually create the MJCF file based on the URDF. However, I find the process quite complex as the XML Reference is very detailed, and I'm hesitant to delve deeper into it. Can you provide me with some guidelines or suggestions on how to convert my robot more conveniently?

how to make the mujoco model

Hi
I'm a engineer using mujoco to model and simulate,but I want to know how to make the mujoco model?
Now we used the URDF files and mujoco software(mujoco-3.1.3-windows-x86_64\bin\compiel.exe) to convert MJCF format XML files,but has some problem(losing the first body),so can help me ?
thks!
缺失body

Attaching the RobotIQ 2f85 gripper to the UR10e robotic arm.

With 2f85 gripper

When combing the tow xml files for the UR10e and the 2f85 gripper, the 2f85 gripper appears to be glitching in the simulation.

Is there any additional context you can provide (e.g., a spec sheet or a URDF to show a value mismatch)?

Hello dear DeepMind engineers,

I hope you and everyone in your family are all well and healthy!!! I am a Research Assistant in Lifelong Deep Reinforcement Learning in Loughborough University. I am a member of the University's Intelligent Automation Lab which focuses a lot on developing intelligent solutions for industrial robotics scenarios. I am working on the Industrial Robots as a Service (IRaaS) project, where I am tasked to solve industrial robotics tasks, such as pick and place, using Deep Reinforcement Learning techniques. For that reason I have worked using the MuJoCo simulated environments to test the DRL algorithms we are developing in our lab, before moving to an actual physical robot. My supervisor requested me to create a Pick and Place environment with the UR10e robot, which our lab is equipped with, fitted with the RobotIQ 2f85 gripper as an end-effector. I have performed this works by adding to the same directory the .obj files for the UR10e and the .stl files for the 2f85. Then, I combined the two xml files for the UR10e and the 2f85 to a new .xml called 'ur10e_2f85.xml'. In this file I have separated the default values and the actuators as much as possible to avoid any conflicts. The 2f85 has been attached to the 'wrist_3_link' and its position matches the position of the 'attachment_site'. Further more I have added contact exclusion of the different parts of the 2f85 to the 'wrist_3_link' of the UR10e to make sure that unwanted collision might cause this behavior. This slightly improved the gripper's behavior but did not fixed it completely. Furthermore, I have experimented with the ' and the parameters to see how they might affect the integration of the two parts. I observed that using both option parameters made the 2f85 gripper to completely collapse after a few MuJoCo simulation steps. Using only the impartion option with the value of 10 seemed to be the most stable option. I will provide you with the ur10e_2f85.xml file that I have created, the Python script that I have developed and been using for performing the opening and closing of the gripper. Furthermore, I am providing you a video clip of the script running with the scene.xml for the UR10e_2f85 combo and one videoclip with the same script running with the scene.xml for the 2f85 only, to demonstrate the glitches occurring in the combo and the normal execution that it is achieved by simply running the script with just the gripper model. The video with the combo is demonstrating the combo's behavior after all the adjustments I have made in my attempt to resolve the issue, as described above. All code files, along with the appropriate scene.xml files for each of the two cases, are included in the supplied .zip file.
UR10e_2f85_xml_plus_Python_manipulation_script.zip

2f85_gripper_manipulation_run.mp4
UR10e_2f85_gripper_manupulation_run.mp4

Can you please help me detect the cause of this issue and resolve it?

Thank you very much in advance for the valuable help and support!!!

Kind regards,

Christos Peridis

Documentation regarding joint and actuator parameters on ViperX 300 6DOF

When trying to replicate the steps cited to generate vx300s.xml, I am unable to generate the kp, damping, armature, and frictionloss values that are found in the MJCF file in this repo. I was wondering if there were additional steps required to replicate those values, or if they were derived from other sources.

I very well could be missing a step in my conversion from xacro to URDF to MJCF, so I apologize in advance if that is the case.

Ufactory Lite 6 load fails due to joint limits

Which model is the issue affecting?
Ufactory Lite6

What is the issue?

import mujoco
model = mujoco.MjModel.from_xml_path("./ufactory_lite6/lite6.xml")

ValueError Traceback (most recent call last)
Cell In[2], line 1
----> 1 model = mujoco.MjModel.from_xml_path("./ufactory_lite6/lite6.xml")

ValueError: Error: joint has range but not limited. set the autolimits="true" compiler option, specify limited explicitly ("true" or "false"), or remove the range attribute.
Object name = joint1, id = 0, line = 58, column = -1

Fix
Set autolimits=true as is done in other models
PR: #62

Add UFactory Lite6

URL for the existing model source (e.g. URDF)
Lite6 URDF

License terms of the upstream model
BSD 3-Clause

What do you think is required to convert and tune this model for MuJoCo?

  • Being able to convert from the URDF to MuJoCo using the compile command
  • Tuning model parameters for actuators

Are you proposing to help develop and maintain the new model?
I would be happy to help develop and maintain the new model.

How to attach 2f85 hand to ur5e arm ?

I would like to attach the robotiq2f85 hand to ur5e arm. I create an attachement site under the wrist3 of the ur5e and attached the hand to it. I use pymjcf from dm_control to create the model file as follow:

from dm_control import mjcf


scene = mjcf.RootElement()
scene.asset.add('texture', type="2d", name="groundplane", builtin="checker", mark="edge", rgb1="0.2 0.3 0.4", rgb2="0.1 0.2 0.3", markrgb="0.8 0.8 0.8", width="300", height="300")
scene.asset.add('material', name="groundplane", texture="groundplane", texuniform="true", texrepeat="5 5", reflectance="0.2")

scene.worldbody.add('light', pos="0 0 1")
scene.worldbody.add('light', pos="0 -0.2 1", dir="0 0.2 -0.8", directional="true")
scene.worldbody.add('geom', name='floor', size="0 0 0.05", type='plane', material='groundplane')

arm = mjcf.from_path('universal_robots_ur5e/ur5e.xml')
wrist = arm.find('body', 'wrist_3_link')
attachement_site = wrist.add('site')

hand = mjcf.from_path('robotiq_2f85/2f85.xml')
attachement_site.attach(hand)

scene.attach(arm)

mjcf.export_with_assets(scene, "scene_2f85", "scene_test.xml")

the file scene_text.xml is generated correctly the hand is not visible when loading the file into the simulator.

mujoco actuator

hi I converted sawyer robot xacro file to urdf using ROS and i loaded in mujoco including mujcoco tag you mentioned. but i was wondering why actuator doesnt seem to work. I heard that we need to use actuator tag to control the joints of robot..
so in other words, i put the actuator tag and loaded in mujoco, and i printed the model bit nu was 0 and there was nothing to control in mujoco gui. is there something else to put to activate actuator in urdf??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.