Skip to content

Commit

Permalink
[init] init
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqin committed Aug 26, 2023
0 parents commit 43ab709
Show file tree
Hide file tree
Showing 23 changed files with 3,473 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Core Tests

on:
push:
branches: [ main, init_dev ]
pull_request:

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade -e .[dev]
- name: Run Black
run: |
black dex-retargeting/ tests/ --check
- name: Run Pyright
run: |
pyright
- name: Test with pytest
run: |
pytest
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build
.vscode
.pyc
*.blend
cmake-build-debug
/cmake-build-debug/
/.ccls-cache/
/.dir-locals.el
__pycache__
.ini
*.convex.*
imgui.ini
.mypy_cache
.DS_Store
/.idea
/log
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "assets"]
path = assets
url = https://github.com/dexsuite/dex-urdf.git
branch = init_dev
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 Yuzhe Qin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Dex Retargeting
---
<p align="center">
<!-- code check badges -->
<!-- license badge -->
<a href="https://github.com/nerfstudio-project/nerfstudio/blob/master/LICENSE">
<img alt="License" src="https://img.shields.io/badge/license-MIT-blue">
</a>
</p>
1 change: 1 addition & 0 deletions assets
Submodule assets added at 32ce56
1 change: 1 addition & 0 deletions dex_retargeting/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
12 changes: 12 additions & 0 deletions dex_retargeting/configs/offline/allegro_hand_right.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
retargeting:
type: position
urdf_path: allegro_hand/allegro_hand_right.urdf
use_camera_frame_retargeting: False

target_joint_names: null
target_link_names: [ "link_15.0_tip", "link_3.0_tip", "link_7.0_tip", "link_11.0_tip" ]

target_link_human_indices: [ 4, 8, 12, 16 ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
17 changes: 17 additions & 0 deletions dex_retargeting/configs/teleop/allegro_hand_left.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
retargeting:
type: vector
urdf_path: allegro_hand/allegro_hand_left.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
target_origin_link_names: [ "wrist", "wrist", "wrist", "wrist" ]
target_task_link_names: [ "link_15.0_tip", "link_3.0_tip", "link_7.0_tip", "link_11.0_tip" ]
scaling_factor: 1.6

# Source refers to the retargeting input, which usually corresponds to the human hand
# The joint indices of human hand joint which corresponds to each link in the target_link_names
target_link_human_indices: [ [ 0, 0, 0, 0 ], [ 4, 8, 12, 16 ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
17 changes: 17 additions & 0 deletions dex_retargeting/configs/teleop/allegro_hand_right.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
retargeting:
type: vector
urdf_path: allegro_hand/allegro_hand_right.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
target_origin_link_names: [ "wrist", "wrist", "wrist", "wrist" ]
target_task_link_names: [ "link_15.0_tip", "link_3.0_tip", "link_7.0_tip", "link_11.0_tip" ]
scaling_factor: 1.6

# Source refers to the retargeting input, which usually corresponds to the human hand
# The joint indices of human hand joint which corresponds to each link in the target_link_names
target_link_human_indices: [ [ 0, 0, 0, 0 ], [ 4, 8, 12, 16 ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
13 changes: 13 additions & 0 deletions dex_retargeting/configs/teleop/allegro_hand_right_dexpilot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
retargeting:
type: DexPilot
urdf_path: allegro_hand/allegro_hand_right.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
wrist_link_name: "wrist"
finger_tip_link_names: [ "link_15.0_tip", "link_3.0_tip", "link_7.0_tip", "link_11.0_tip" ]
scaling_factor: 1.6

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
17 changes: 17 additions & 0 deletions dex_retargeting/configs/teleop/schunk_svh_hand_right.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
retargeting:
type: vector
urdf_path: schunk_hand/schunk_svh_hand_right.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
target_origin_link_names: [ "right_hand_base_link","right_hand_base_link", "right_hand_base_link", "right_hand_base_link", "right_hand_base_link", ]
target_task_link_names: [ "right_hand_c", "right_hand_t", "right_hand_s", "right_hand_r", "right_hand_q" ]
scaling_factor: 1.1

# Source refers to the retargeting input, which usually corresponds to the human hand
# The joint indices of human hand joint which corresponds to each link in the target_link_names
target_link_human_indices: [ [ 0, 0, 0, 0, 0 ], [ 4, 8, 12, 16, 20, ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
17 changes: 17 additions & 0 deletions dex_retargeting/configs/teleop/shadow_hand_right.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
retargeting:
type: vector
urdf_path: shadow_hand/shadow_hand_right.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
target_origin_link_names: [ "palm", "palm", "palm", "palm", "palm", "palm", "palm", "palm", "palm", "palm" ]
target_task_link_names: [ "thtip", "fftip", "mftip", "rftip", "lftip", "thmiddle", "ffmiddle", "mfmiddle", "rfmiddle", "lfmiddle" ]
scaling_factor: 1.2

# Source refers to the retargeting input, which usually corresponds to the human hand
# The joint indices of human hand joint which corresponds to each link in the target_link_names
target_link_human_indices: [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 4, 8, 12, 16, 20, 2, 6, 10, 14, 18 ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
Loading

0 comments on commit 43ab709

Please sign in to comment.