Skip to content

Commit

Permalink
[update] update build dev wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqin committed May 5, 2024
1 parent 80d1d61 commit dfbe1b6
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build Nightly

on:
push:
branches: [ main, dev ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8" ]

permissions:
id-token: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Build wheels
run: pip3 install setuptools build --upgrade && python -m build -w

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./dist/*.whl

- name: Update Nightly Release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'dvp_teleop Nightly Release'
prerelease: true
body: 'Nightly release.'
files: |
./dist/*.whl
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ Dex Retargeting
## Installation

```shell
pip3 install -e ".[example]"
# If you do not need to run the examples:
# pip install -e .
# Install from pypi
pip install dex_retargeting``

# Or install from Github
git clone https://github.com/dexsuite/dex-retargeting
cd dex-retargeting
pip install -e .
```

To run the example, you may need additional dependencies for rendering and hand pose detection.

```shell
pip install -e ".[example]"
```

## Examples
Expand Down
20 changes: 20 additions & 0 deletions dex_retargeting/configs/teleop/schunk_svh_hand_left.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
retargeting:
type: vector
urdf_path: schunk_hand/schunk_svh_hand_left.urdf
wrist_link_name: "right_hand_base_link"

# Target refers to the retargeting target, which is the robot hand
target_joint_names: [ 'right_hand_Thumb_Opposition', 'right_hand_Thumb_Flexion', 'right_hand_Index_Finger_Proximal',
'right_hand_Index_Finger_Distal', 'right_hand_Finger_Spread', 'right_hand_Pinky',
'right_hand_Ring_Finger', 'right_hand_Middle_Finger_Proximal', 'right_hand_Middle_Finger_Distal' ]
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.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 ], [ 4, 8, 12, 16, 20, ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
18 changes: 18 additions & 0 deletions dex_retargeting/configs/teleop/schunk_svh_hand_left_dexpilot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
retargeting:
type: DexPilot
urdf_path: schunk_hand/schunk_svh_hand_left.urdf
wrist_link_name: "right_hand_base_link"

# Target refers to the retargeting target, which is the robot hand
target_joint_names: [ 'right_hand_Thumb_Opposition', 'right_hand_Thumb_Flexion', 'right_hand_Index_Finger_Proximal',
'right_hand_Index_Finger_Distal', 'right_hand_Finger_Spread', 'right_hand_Pinky',
'right_hand_Ring_Finger', 'right_hand_Middle_Finger_Proximal', 'right_hand_Middle_Finger_Distal' ]
finger_tip_link_names: [ "right_hand_c", "right_hand_t", "right_hand_s", "right_hand_r", "right_hand_q" ]
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 ], [ 4, 8, 12, 16, 20, ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
2 changes: 1 addition & 1 deletion dex_retargeting/retargeting_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def build(self) -> SeqRetargeting:
)
optimizer.set_kinematic_adaptor(adaptor)
print(
"\033[34m\n",
"\033[34m",
"Mimic joint adaptor enabled. The mimic joint tags in the URDF will be considered during retargeting.\n"
"To disable mimic joint adaptor, consider setting ignore_mimic_joint=True in the configuration.",
"\033[39m",
Expand Down

0 comments on commit dfbe1b6

Please sign in to comment.