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

feat: add unitree z1 #36

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions unitree_z1/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2016-2022 HangZhou YuShu TECHNOLOGY CO.,LTD. ("Unitree Robotics")
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 changes: 20 additions & 0 deletions unitree_z1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Unitree Z1 description (MJCF)

## Overview

This package contains robot description (MJCF) of the [Z1 manipulator](https://www.unitree.com/z1/). It is derivede from the [publicly available URDF description](https://github.com/unitreerobotics/unitree_ros/blob/master/robots/z1_description/xacro/z1.urdf)

<p float="left">
<img src="z1.png" width="400">
</p>

## URDF → MJCF derivation steps

1. Added `<mujoco><compiler balanceinertia="true" discardvisual="false"/></mujoco>` to the URDF's `<robot>` clause in order to preserve visual geometries.
2. Loaded the URDF into MuJoCo and saved a corresponding MJCF.
3. Manually edited the MJCF to use meshes for collision too.
4. Added `scene.xml` which includes the robot, with a textured groundplane, skybox and haze.e.

## License

This model is released under a [BSD-3-Clause License](LICENSE).
Binary file added unitree_z1/assets/z1_GripperMover.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_GripperStator.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link00.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link01.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link02.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link03.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link04.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link05.stl
Binary file not shown.
Binary file added unitree_z1/assets/z1_Link06.stl
Binary file not shown.
23 changes: 23 additions & 0 deletions unitree_z1/scene.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<mujoco model="z1 scene">
<include file="z1.xml"/>

<statistic center="0 0 0.1" extent="0.8"/>

<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 azimuth="120" elevation="-20"/>
</visual>

<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"/>
</worldbody>
</mujoco>
Binary file added unitree_z1/z1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions unitree_z1/z1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<mujoco model="z1">
<compiler angle="radian" meshdir="assets"/>

<default>
<default class="z1">
<default class="visual">
<geom type="mesh"/>
</default>
</default>
</default>

<asset>
<mesh name="z1_Link00" file="z1_Link00.stl"/>
<mesh name="z1_Link01" file="z1_Link01.stl"/>
<mesh name="z1_Link02" file="z1_Link02.stl"/>
<mesh name="z1_Link03" file="z1_Link03.stl"/>
<mesh name="z1_Link04" file="z1_Link04.stl"/>
<mesh name="z1_Link05" file="z1_Link05.stl"/>
<mesh name="z1_Link06" file="z1_Link06.stl"/>
</asset>

<worldbody>
<body name="link00">
<inertial pos="-0.00334984 -0.00013615 0.0249584" quat="-0.00692194 0.682592 0.00133293 0.730766" mass="0.472475"
diaginertia="0.000531375 0.000415207 0.000378658"/>
<geom class="visual" mesh="z1_Link00"/>
<body name="link01" pos="0 0 0.0585">
<inertial pos="2.47e-06 -0.00025198 0.0231717" quat="0.708578 0.705633 0.000281462 -0.000355927" mass="0.673326"
diaginertia="0.00128328 0.000839362 0.000719308"/>
<joint name="joint1" pos="0 0 0" axis="0 0 1" range="-2.61799 2.61799" damping="1" frictionloss="1"/>
<geom class="visual" mesh="z1_Link01"/>
<body name="link02" pos="0 0 0.045">
<inertial pos="-0.110126 0.00240029 0.00158266" quat="0.00748058 0.707092 -0.0114473 0.70699" mass="1.19132"
diaginertia="0.0246612 0.0243113 0.00100468"/>
<joint name="joint2" pos="0 0 0" axis="0 1 0" range="0 2.96706" damping="2" frictionloss="2"/>
<geom class="visual" mesh="z1_Link02"/>
<body name="link03" pos="-0.35 0 0">
<inertial pos="0.106092 -0.00541815 0.0347638" quat="0.540557 0.443575 0.426319 0.573839" mass="0.839409"
diaginertia="0.00954365 0.00938711 0.000558432"/>
<joint name="joint3" pos="0 0 0" axis="0 1 0" range="-2.87979 0" damping="1" frictionloss="1"/>
<geom class="visual" mesh="z1_Link03"/>
<body name="link04" pos="0.218 0 0.057">
<inertial pos="0.0436668 0.00364738 -0.00170192" quat="0.0390835 0.726445 -0.0526787 0.684087"
mass="0.564046" diaginertia="0.000981656 0.00094053 0.000302655"/>
<joint name="joint4" pos="0 0 0" axis="0 1 0" range="-1.51844 1.51844" damping="1" frictionloss="1"/>
<geom class="visual" mesh="z1_Link04"/>
<body name="link05" pos="0.07 0 0">
<inertial pos="0.0312153 0 0.00646316" quat="0.462205 0.535209 0.53785 0.45895" mass="0.389385"
diaginertia="0.000558961 0.000547317 0.000167332"/>
<joint name="joint5" pos="0 0 0" axis="0 0 1" range="-1.3439 1.3439" damping="1" frictionloss="1"/>
<geom class="visual" mesh="z1_Link05"/>
<body name="link06" pos="0.0492 0 0">
<inertial pos="0.0241569 -0.00017355 -0.00143876" quat="0.998779 0.0457735 -0.00663717 0.0173548"
mass="0.288758" diaginertia="0.00018333 0.000147464 0.000146786"/>
<joint name="joint6" pos="0 0 0" axis="1 0 0" range="-2.79253 2.79253" damping="1" frictionloss="1"/>
<geom class="visual" mesh="z1_Link06"/>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</worldbody>

<actuator>
<general name="motor1" joint="joint1"/>
<general name="motor2" joint="joint2"/>
<general name="motor3" joint="joint3"/>
<general name="motor4" joint="joint4"/>
<general name="motor5" joint="joint5"/>
<general name="motor6" joint="joint6"/>
</actuator>
</mujoco>
Loading