orca-core 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orca_core-0.3.0/.github/workflows/release.yml +54 -0
- orca_core-0.3.0/.github/workflows/test.yml +29 -0
- orca_core-0.3.0/.gitignore +131 -0
- orca_core-0.3.0/CLAUDE.md +145 -0
- orca_core-0.3.0/LICENSE +21 -0
- orca_core-0.3.0/PKG-INFO +114 -0
- orca_core-0.3.0/README.md +98 -0
- orca_core-0.3.0/demo/kapangi_replay_sequence_20250504_002233.yaml +86 -0
- orca_core-0.3.0/docs/auto_docs_instructions.md +23 -0
- orca_core-0.3.0/docs/css/overrides.css +134 -0
- orca_core-0.3.0/docs/img/logo-light-256.png +0 -0
- orca_core-0.3.0/docs/index.md +10 -0
- orca_core-0.3.0/docs/pages/getting-started-docs/initial-tensioning-and-calibration.md +38 -0
- orca_core-0.3.0/docs/pages/getting-started-docs/quickstart-with-core-package.md +88 -0
- orca_core-0.3.0/docs/pages/getting-started-docs/setting-up-config.md +172 -0
- orca_core-0.3.0/docs/pages/getting-started-docs/setting-up-dynamixels.md +78 -0
- orca_core-0.3.0/docs/pages/orca-core-docs/latency-optimization.md +201 -0
- orca_core-0.3.0/docs/pages/orca-core-docs/motor-client-api.md +572 -0
- orca_core-0.3.0/docs/pages/orca-core-docs/orca-core-scripts.md +259 -0
- orca_core-0.3.0/docs/pages/orca-core-docs/orca-core-structure.md +30 -0
- orca_core-0.3.0/docs/pages/orca-core-docs/orcahand-api.md +23 -0
- orca_core-0.3.0/docs/requirements.txt +10 -0
- orca_core-0.3.0/mkdocs.yml +72 -0
- orca_core-0.3.0/orca_core/__init__.py +28 -0
- orca_core-0.3.0/orca_core/api/__init__.py +0 -0
- orca_core-0.3.0/orca_core/api/api.py +365 -0
- orca_core-0.3.0/orca_core/base_hand.py +244 -0
- orca_core-0.3.0/orca_core/calibration.py +78 -0
- orca_core-0.3.0/orca_core/constants.py +76 -0
- orca_core-0.3.0/orca_core/core.py +11 -0
- orca_core-0.3.0/orca_core/demo_presets.py +99 -0
- orca_core-0.3.0/orca_core/hand_config.py +402 -0
- orca_core-0.3.0/orca_core/hardware/__init__.py +0 -0
- orca_core-0.3.0/orca_core/hardware/dynamixel_client.py +911 -0
- orca_core-0.3.0/orca_core/hardware/feetech/__init__.py +10 -0
- orca_core-0.3.0/orca_core/hardware/feetech/group_sync_read.py +151 -0
- orca_core-0.3.0/orca_core/hardware/feetech/group_sync_write.py +73 -0
- orca_core-0.3.0/orca_core/hardware/feetech/hls.py +114 -0
- orca_core-0.3.0/orca_core/hardware/feetech/port_handler.py +115 -0
- orca_core-0.3.0/orca_core/hardware/feetech/protocol_packet_handler.py +565 -0
- orca_core-0.3.0/orca_core/hardware/feetech/scscl.py +104 -0
- orca_core-0.3.0/orca_core/hardware/feetech/scservo_def.py +27 -0
- orca_core-0.3.0/orca_core/hardware/feetech/sms_sts.py +114 -0
- orca_core-0.3.0/orca_core/hardware/feetech_client.py +778 -0
- orca_core-0.3.0/orca_core/hardware/mock_dynamixel_client.py +522 -0
- orca_core-0.3.0/orca_core/hardware/mock_tactile_client.py +283 -0
- orca_core-0.3.0/orca_core/hardware/motor_client.py +172 -0
- orca_core-0.3.0/orca_core/hardware/sensing/__init__.py +0 -0
- orca_core-0.3.0/orca_core/hardware/sensing/constants.py +108 -0
- orca_core-0.3.0/orca_core/hardware/sensing/protocol.py +544 -0
- orca_core-0.3.0/orca_core/hardware/sensing/types.py +74 -0
- orca_core-0.3.0/orca_core/hardware/tactile_client.py +775 -0
- orca_core-0.3.0/orca_core/hardware_hand.py +1513 -0
- orca_core-0.3.0/orca_core/joint_position.py +147 -0
- orca_core-0.3.0/orca_core/utils/__init__.py +10 -0
- orca_core-0.3.0/orca_core/utils/utils.py +338 -0
- orca_core-0.3.0/orca_core/version.py +1 -0
- orca_core-0.3.0/pyproject.toml +45 -0
- orca_core-0.3.0/scripts/calibrate.py +71 -0
- orca_core-0.3.0/scripts/check_motor.py +58 -0
- orca_core-0.3.0/scripts/common.py +113 -0
- orca_core-0.3.0/scripts/configure_motor_chain.py +544 -0
- orca_core-0.3.0/scripts/debug_overload.py +72 -0
- orca_core-0.3.0/scripts/example_tactile.py +51 -0
- orca_core-0.3.0/scripts/jitter.py +58 -0
- orca_core-0.3.0/scripts/main_demo.py +37 -0
- orca_core-0.3.0/scripts/main_demo_abduction.py +37 -0
- orca_core-0.3.0/scripts/neutral.py +29 -0
- orca_core-0.3.0/scripts/overload_demo.py +123 -0
- orca_core-0.3.0/scripts/record_angles.py +85 -0
- orca_core-0.3.0/scripts/record_continuous.py +83 -0
- orca_core-0.3.0/scripts/replay_angles.py +94 -0
- orca_core-0.3.0/scripts/replay_continuous.py +79 -0
- orca_core-0.3.0/scripts/setup.py +221 -0
- orca_core-0.3.0/scripts/slider_joint.py +119 -0
- orca_core-0.3.0/scripts/slider_motor.py +112 -0
- orca_core-0.3.0/scripts/stress_test.py +162 -0
- orca_core-0.3.0/scripts/tension.py +33 -0
- orca_core-0.3.0/scripts/test_motor_latency.py +650 -0
- orca_core-0.3.0/scripts/test_overload.py +53 -0
- orca_core-0.3.0/scripts/test_sensors.py +527 -0
- orca_core-0.3.0/scripts/zero.py +36 -0
- orca_core-0.3.0/tests/__init__.py +0 -0
- orca_core-0.3.0/tests/conftest.py +112 -0
- orca_core-0.3.0/tests/reference/calibration_expected.yaml +49 -0
- orca_core-0.3.0/tests/test_base_hand_contract.py +195 -0
- orca_core-0.3.0/tests/test_calibration.py +45 -0
- orca_core-0.3.0/tests/test_calibration_reference.py +84 -0
- orca_core-0.3.0/tests/test_connect_resolution.py +124 -0
- orca_core-0.3.0/tests/test_core.py +65 -0
- orca_core-0.3.0/tests/test_hardware_hand.py +63 -0
- orca_core-0.3.0/tests/test_jitter.py +138 -0
- orca_core-0.3.0/tests/test_model_dispatch.py +129 -0
- orca_core-0.3.0/tests/test_protocol.py +521 -0
- orca_core-0.3.0/tests/test_tactile_sensor.py +262 -0
- orca_core-0.3.0/tests/test_tension.py +35 -0
- orca_core-0.3.0/tests/test_yaml.py +61 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v5
|
|
17
|
+
|
|
18
|
+
- name: Verify tag matches pyproject.toml version
|
|
19
|
+
run: |
|
|
20
|
+
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
|
21
|
+
PROJECT_VERSION=$(grep -m1 '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
|
|
22
|
+
if [ "$TAG_VERSION" != "$PROJECT_VERSION" ]; then
|
|
23
|
+
echo "Tag v$TAG_VERSION does not match pyproject.toml version $PROJECT_VERSION"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
echo "Version check passed: $PROJECT_VERSION"
|
|
27
|
+
|
|
28
|
+
- name: Build sdist and wheel
|
|
29
|
+
run: uv build
|
|
30
|
+
|
|
31
|
+
- name: Upload distribution artifacts
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: dist
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
publish:
|
|
38
|
+
name: Publish to PyPI
|
|
39
|
+
needs: build
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
environment:
|
|
42
|
+
name: pypi
|
|
43
|
+
url: https://pypi.org/p/orca_core
|
|
44
|
+
permissions:
|
|
45
|
+
id-token: write
|
|
46
|
+
steps:
|
|
47
|
+
- name: Download distribution artifacts
|
|
48
|
+
uses: actions/download-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: dist
|
|
51
|
+
path: dist/
|
|
52
|
+
|
|
53
|
+
- name: Publish to PyPI
|
|
54
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Run Tests on Pull Request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: '3.10'
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
uv sync --group dev
|
|
26
|
+
|
|
27
|
+
- name: Run Tests
|
|
28
|
+
run: |
|
|
29
|
+
uv run pytest
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# celery beat schedule file
|
|
88
|
+
celerybeat-schedule
|
|
89
|
+
|
|
90
|
+
# SageMath parsed files
|
|
91
|
+
*.sage.py
|
|
92
|
+
|
|
93
|
+
# Environments
|
|
94
|
+
.env
|
|
95
|
+
.venv
|
|
96
|
+
env/
|
|
97
|
+
venv/
|
|
98
|
+
ENV/
|
|
99
|
+
env.bak/
|
|
100
|
+
venv.bak/
|
|
101
|
+
|
|
102
|
+
# Spyder project settings
|
|
103
|
+
.spyderproject
|
|
104
|
+
.spyderworkspace
|
|
105
|
+
|
|
106
|
+
# Rope project settings
|
|
107
|
+
.ropeproject
|
|
108
|
+
|
|
109
|
+
# mkdocs documentation
|
|
110
|
+
/site
|
|
111
|
+
|
|
112
|
+
# mypy
|
|
113
|
+
.mypy_cache/
|
|
114
|
+
.dmypy.json
|
|
115
|
+
dmypy.json
|
|
116
|
+
|
|
117
|
+
# Pyre type checker
|
|
118
|
+
.pyre/
|
|
119
|
+
|
|
120
|
+
.vscode/
|
|
121
|
+
|
|
122
|
+
urdf/
|
|
123
|
+
|
|
124
|
+
dev_scripts/
|
|
125
|
+
|
|
126
|
+
orca_core/models/*
|
|
127
|
+
|
|
128
|
+
# macOS
|
|
129
|
+
.DS_Store
|
|
130
|
+
|
|
131
|
+
.pytest_cache/
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Claude Code Instructions
|
|
2
|
+
|
|
3
|
+
## Project: ORCA Core
|
|
4
|
+
|
|
5
|
+
Control package for the ORCA Hand - a dexterous open-source robotic hand. Provides hardware abstraction, calibration tools, and high-level joint-space control.
|
|
6
|
+
|
|
7
|
+
## Project Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
orca_core/
|
|
11
|
+
├── api/ # High-level control API
|
|
12
|
+
├── hardware/ # Hardware interfaces (motors)
|
|
13
|
+
│ ├── dynamixel_client.py # Dynamixel motor control
|
|
14
|
+
├── utils/ # Shared utilities
|
|
15
|
+
├── models/ # Hand configurations (YAML)
|
|
16
|
+
└── core.py # Main OrcaHand API
|
|
17
|
+
|
|
18
|
+
scripts/ # CLI tools for calibration, demos
|
|
19
|
+
tests/ # Unit tests
|
|
20
|
+
docs/ # Documentation
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Key Files
|
|
24
|
+
|
|
25
|
+
- [orca_core/core.py](orca_core/core.py) - Main `OrcaHand` class API
|
|
26
|
+
- [orca_core/hardware/dynamixel_client.py](orca_core/hardware/dynamixel_client.py) - Motor control interface
|
|
27
|
+
- [orca_core/models/*/config.yaml](orca_core/models/) - Hand configuration files
|
|
28
|
+
- [scripts/](scripts/) - Calibration and utility scripts
|
|
29
|
+
|
|
30
|
+
### Hardware Components
|
|
31
|
+
|
|
32
|
+
| Component | Interface | Description |
|
|
33
|
+
|-----------|-----------|-------------|
|
|
34
|
+
| Dynamixel Motors | `dynamixel_client.py` | Servo motor control (17 motors) |
|
|
35
|
+
| Hand Configuration | `config.yaml` | Joint mapping, ROMs, calibration |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
|
|
41
|
+
### Git & PRs
|
|
42
|
+
|
|
43
|
+
- Work on feature branches: `feature/description` or `fix/description`
|
|
44
|
+
- Never push directly to `main`
|
|
45
|
+
- Create PRs for all changes
|
|
46
|
+
|
|
47
|
+
### Commit Guidelines
|
|
48
|
+
|
|
49
|
+
- Use conventional commits: `Add feature`, `Fix bug`, `Update docs`
|
|
50
|
+
- Keep messages concise and descriptive
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Code Style
|
|
55
|
+
|
|
56
|
+
**Keep code clean and readable:**
|
|
57
|
+
|
|
58
|
+
- Write concise, self-documenting code
|
|
59
|
+
- Avoid excessive comments - prefer clear variable/function names
|
|
60
|
+
- Only add comments for complex logic or non-obvious design decisions
|
|
61
|
+
- Remove commented-out code before committing
|
|
62
|
+
- Follow existing patterns in the codebase
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
### Virtual Environment
|
|
69
|
+
|
|
70
|
+
**IMPORTANT:** Use `uv` for Python commands and dependency management in this repo.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uv sync --group dev
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This creates a local `.venv`. If you prefer an activated shell, use:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
source .venv/bin/activate
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Never install packages to the base/system Python environment.
|
|
83
|
+
|
|
84
|
+
### Setup
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv sync --group dev
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Testing
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
uv run pytest tests/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Common Scripts
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Calibration workflow
|
|
100
|
+
uv run python scripts/tension.py orca_core/models/orcahand_v1_right
|
|
101
|
+
uv run python scripts/calibrate.py orca_core/models/orcahand_v1_right
|
|
102
|
+
uv run python scripts/neutral.py orca_core/models/orcahand_v1_right
|
|
103
|
+
|
|
104
|
+
# Manual control
|
|
105
|
+
uv run python scripts/slider_joint.py orca_core/models/orcahand_v1_right
|
|
106
|
+
uv run python scripts/slider_motor.py orca_core/models/orcahand_v1_right
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Configuration
|
|
110
|
+
|
|
111
|
+
All hand-specific settings are in `config.yaml`:
|
|
112
|
+
- Motor-to-joint mapping
|
|
113
|
+
- Joint ROMs (ranges of motion)
|
|
114
|
+
- Neutral positions
|
|
115
|
+
- Calibration sequences
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Technical Notes
|
|
120
|
+
|
|
121
|
+
### Control Modes
|
|
122
|
+
|
|
123
|
+
- `current_based_position` (recommended) - Position control with current feedback
|
|
124
|
+
- `position` - Direct position control
|
|
125
|
+
- `current` - Direct current control
|
|
126
|
+
- `velocity` - Velocity control
|
|
127
|
+
|
|
128
|
+
### Joint Naming Convention
|
|
129
|
+
|
|
130
|
+
Format: `{finger}_{joint_type}`
|
|
131
|
+
|
|
132
|
+
Fingers: `thumb`, `index`, `middle`, `ring`, `pinky`, `wrist`
|
|
133
|
+
Joint types: `mcp`, `pip`, `dip`, `abd` (abduction)
|
|
134
|
+
|
|
135
|
+
Example: `index_mcp`, `thumb_pip`
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Architecture
|
|
140
|
+
|
|
141
|
+
See [docs/architecture-diagram.md](docs/architecture-diagram.md) for visual diagrams of:
|
|
142
|
+
- System overview and component interactions
|
|
143
|
+
- Data flow and sequence diagrams
|
|
144
|
+
- Directory structure
|
|
145
|
+
- Calibration workflow
|
orca_core-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2025] [ORCA]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
orca_core-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orca_core
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Core Python Controller of the ORCA Hand. Handles all hardware interaction, logic and abstracts control. Provides API for basic functionality and info of the hand.
|
|
5
|
+
Author-email: clemens-chr <cchristoph@student.ethz.ch>, fabricenoelbourquin <fabrice.bourquin@protonmail.ch>, maximilianeberlein <meberlein@ethz.ch>, fracapuano <capuano@robots.ox.ac.uk>
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: dynamixel-sdk<4.0.0,>=3.7.31
|
|
10
|
+
Requires-Dist: fastapi<0.116.0,>=0.115.12
|
|
11
|
+
Requires-Dist: numpy<3.0.0,>=2.2.6
|
|
12
|
+
Requires-Dist: pyserial<4.0,>=3.5
|
|
13
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0.2
|
|
14
|
+
Requires-Dist: uvicorn<0.35.0,>=0.34.2
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
<div align="center" style="line-height: 1;">
|
|
18
|
+
<a href="https://arxiv.org/abs/2504.04259" target="_blank"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2504.04259-B31B1B?logo=arxiv"/></a>
|
|
19
|
+
<a href="https://discord.gg/xvGyxaccRa" target="_blank"><img alt="Discord" src="https://img.shields.io/badge/Discord-orcahand-7289da?logo=discord&logoColor=white&color=7289da"/></a>
|
|
20
|
+
<a href="https://x.com/orcahand" target="_blank"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/orcahand?style=social"/></a>
|
|
21
|
+
<a href="https://orcahand.com" target="_blank"><img alt="Website" src="https://img.shields.io/badge/Website-orcahand.com-blue?style=flat&logo=google-chrome"/></a>
|
|
22
|
+
<br>
|
|
23
|
+
<a href="https://github.com/orcahand/orca_core" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/orcahand/orca_core?style=social"/></a>
|
|
24
|
+
<a href="https://github.com/orcahand/orca_core/actions/workflows/test.yml" target="_blank"><img alt="Tests" src="https://github.com/orcahand/orca_core/actions/workflows/test.yml/badge.svg"/></a>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
Orca Core is the core control package of the ORCA Hand. It's used to abstract hardware, provide scripts for calibration, tensioning and to control the hand with simple high-level control methods in joint space.
|
|
28
|
+
|
|
29
|
+
## Get Started
|
|
30
|
+
|
|
31
|
+
To get started with Orca Core, follow these steps:
|
|
32
|
+
|
|
33
|
+
1. **Sync a local development environment with `uv`**:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
uv sync --group dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This creates a local `.venv` and installs the package plus development dependencies.
|
|
40
|
+
|
|
41
|
+
2. **Run commands through `uv`**:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
uv run pytest
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If you prefer an activated shell, you can still use:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
source .venv/bin/activate
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
End users who do not use `uv` can still install the package with:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
pip install .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. **Check the configuration file**:
|
|
60
|
+
|
|
61
|
+
- Review the config file (e.g., `orca_core/models/v2/orcahand_right/config.yaml`) and make sure it matches your hardware setup.
|
|
62
|
+
|
|
63
|
+
4. **Run the tension and calibration scripts**:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
uv run python scripts/tension.py orca_core/models/v2/orcahand_right/config.yaml
|
|
67
|
+
uv run python scripts/calibrate.py orca_core/models/v2/orcahand_right/config.yaml
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Replace the path with your specific hand model folder if needed.
|
|
71
|
+
|
|
72
|
+
5. **Move the hand to the neutral position**:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
uv run python scripts/neutral.py orca_core/models/v2/orcahand_right/config.yaml
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Troubleshooting
|
|
81
|
+
|
|
82
|
+
### Serial Port Permissions (Linux)
|
|
83
|
+
|
|
84
|
+
On Linux, the serial port (e.g., `/dev/ttyACM0`) is owned by the `dialout` group. If your user is not in this group, you will get a **permission denied** error and motors won't be detected.
|
|
85
|
+
|
|
86
|
+
**Permanent fix** (requires re-login):
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
sudo usermod -aG dialout $USER
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Temporary fix** (resets on reboot/replug):
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
sudo chmod 666 /dev/ttyACM0
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Serial port, baudrate, and motor type
|
|
99
|
+
|
|
100
|
+
By default these are all **auto-detected** at connect time.
|
|
101
|
+
|
|
102
|
+
However, you can declare them explicitly in `config.yaml`. Useful when:
|
|
103
|
+
|
|
104
|
+
- **multiple hands are connected** at once → `port` disambiguates which one
|
|
105
|
+
- **motors run at a non-default baudrate** → `baudrate` skips the probe sweep
|
|
106
|
+
- **the auto-detection picks the wrong family** → `motor_type` forces a specific one
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
# Optional overrides: auto-detected if omitted
|
|
110
|
+
port: /dev/ttyACM0 # or /'dev/cu.usbmodemXXXX' on macOS
|
|
111
|
+
baudrate: 1000000 # 1M for v2; 3M for v1
|
|
112
|
+
motor_type: dynamixel # or 'feetech'
|
|
113
|
+
```
|
|
114
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<div align="center" style="line-height: 1;">
|
|
2
|
+
<a href="https://arxiv.org/abs/2504.04259" target="_blank"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2504.04259-B31B1B?logo=arxiv"/></a>
|
|
3
|
+
<a href="https://discord.gg/xvGyxaccRa" target="_blank"><img alt="Discord" src="https://img.shields.io/badge/Discord-orcahand-7289da?logo=discord&logoColor=white&color=7289da"/></a>
|
|
4
|
+
<a href="https://x.com/orcahand" target="_blank"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/orcahand?style=social"/></a>
|
|
5
|
+
<a href="https://orcahand.com" target="_blank"><img alt="Website" src="https://img.shields.io/badge/Website-orcahand.com-blue?style=flat&logo=google-chrome"/></a>
|
|
6
|
+
<br>
|
|
7
|
+
<a href="https://github.com/orcahand/orca_core" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/orcahand/orca_core?style=social"/></a>
|
|
8
|
+
<a href="https://github.com/orcahand/orca_core/actions/workflows/test.yml" target="_blank"><img alt="Tests" src="https://github.com/orcahand/orca_core/actions/workflows/test.yml/badge.svg"/></a>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
Orca Core is the core control package of the ORCA Hand. It's used to abstract hardware, provide scripts for calibration, tensioning and to control the hand with simple high-level control methods in joint space.
|
|
12
|
+
|
|
13
|
+
## Get Started
|
|
14
|
+
|
|
15
|
+
To get started with Orca Core, follow these steps:
|
|
16
|
+
|
|
17
|
+
1. **Sync a local development environment with `uv`**:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
uv sync --group dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This creates a local `.venv` and installs the package plus development dependencies.
|
|
24
|
+
|
|
25
|
+
2. **Run commands through `uv`**:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
uv run pytest
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If you prefer an activated shell, you can still use:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
source .venv/bin/activate
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
End users who do not use `uv` can still install the package with:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
pip install .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Check the configuration file**:
|
|
44
|
+
|
|
45
|
+
- Review the config file (e.g., `orca_core/models/v2/orcahand_right/config.yaml`) and make sure it matches your hardware setup.
|
|
46
|
+
|
|
47
|
+
4. **Run the tension and calibration scripts**:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
uv run python scripts/tension.py orca_core/models/v2/orcahand_right/config.yaml
|
|
51
|
+
uv run python scripts/calibrate.py orca_core/models/v2/orcahand_right/config.yaml
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Replace the path with your specific hand model folder if needed.
|
|
55
|
+
|
|
56
|
+
5. **Move the hand to the neutral position**:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
uv run python scripts/neutral.py orca_core/models/v2/orcahand_right/config.yaml
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Troubleshooting
|
|
65
|
+
|
|
66
|
+
### Serial Port Permissions (Linux)
|
|
67
|
+
|
|
68
|
+
On Linux, the serial port (e.g., `/dev/ttyACM0`) is owned by the `dialout` group. If your user is not in this group, you will get a **permission denied** error and motors won't be detected.
|
|
69
|
+
|
|
70
|
+
**Permanent fix** (requires re-login):
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
sudo usermod -aG dialout $USER
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Temporary fix** (resets on reboot/replug):
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
sudo chmod 666 /dev/ttyACM0
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Serial port, baudrate, and motor type
|
|
83
|
+
|
|
84
|
+
By default these are all **auto-detected** at connect time.
|
|
85
|
+
|
|
86
|
+
However, you can declare them explicitly in `config.yaml`. Useful when:
|
|
87
|
+
|
|
88
|
+
- **multiple hands are connected** at once → `port` disambiguates which one
|
|
89
|
+
- **motors run at a non-default baudrate** → `baudrate` skips the probe sweep
|
|
90
|
+
- **the auto-detection picks the wrong family** → `motor_type` forces a specific one
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
# Optional overrides: auto-detected if omitted
|
|
94
|
+
port: /dev/ttyACM0 # or /'dev/cu.usbmodemXXXX' on macOS
|
|
95
|
+
baudrate: 1000000 # 1M for v2; 3M for v1
|
|
96
|
+
motor_type: dynamixel # or 'feetech'
|
|
97
|
+
```
|
|
98
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
waypoints:
|
|
2
|
+
- - -1.3838059871070456
|
|
3
|
+
- 39.50322115940708
|
|
4
|
+
- 29.727971294064197
|
|
5
|
+
- 3.9583243017137164
|
|
6
|
+
- 23.259423624484
|
|
7
|
+
- -1.4294918424607772
|
|
8
|
+
- -6.4964021105343335
|
|
9
|
+
- 0.36155512208764407
|
|
10
|
+
- -2.317030842836431
|
|
11
|
+
- 0.19268796429848578
|
|
12
|
+
- -16.086516407281145
|
|
13
|
+
- -8.04819335676791
|
|
14
|
+
- -1.0183711992257258
|
|
15
|
+
- -30.540644808170356
|
|
16
|
+
- -7.890279922866355
|
|
17
|
+
- 1.3903098387457788
|
|
18
|
+
- -6.765344072379541
|
|
19
|
+
- - 11.843708014395531
|
|
20
|
+
- 33.810570990938395
|
|
21
|
+
- 39.6509771563681
|
|
22
|
+
- 14.716653238081136
|
|
23
|
+
- 20.16004390320306
|
|
24
|
+
- 41.61191935986699
|
|
25
|
+
- 48.158546502335575
|
|
26
|
+
- -0.891868436564458
|
|
27
|
+
- 21.581234833483606
|
|
28
|
+
- 12.94145956318161
|
|
29
|
+
- -11.771373854495955
|
|
30
|
+
- 4.8521717094038195
|
|
31
|
+
- 19.387890720620135
|
|
32
|
+
- -23.677574769678245
|
|
33
|
+
- 3.2740759381415074
|
|
34
|
+
- 1.292636913806362
|
|
35
|
+
- -10.32605867302501
|
|
36
|
+
- - 20.288968200727723
|
|
37
|
+
- 10.141096095502142
|
|
38
|
+
- 38.111201874647584
|
|
39
|
+
- 14.34244948098383
|
|
40
|
+
- 18.093793188612146
|
|
41
|
+
- 26.65187571443417
|
|
42
|
+
- 8.794589227884572
|
|
43
|
+
- -1.3739544206614198
|
|
44
|
+
- 60.711363532662624
|
|
45
|
+
- 41.77592761266973
|
|
46
|
+
- -11.972079610186114
|
|
47
|
+
- 26.858668149988716
|
|
48
|
+
- 27.66589091710985
|
|
49
|
+
- -24.98963527595022
|
|
50
|
+
- 7.4156882107908615
|
|
51
|
+
- 1.3903098387457788
|
|
52
|
+
- -10.32605867302501
|
|
53
|
+
- - 25.88522370626887
|
|
54
|
+
- -2.542548796834623
|
|
55
|
+
- 39.47989692307919
|
|
56
|
+
- 13.687600176108575
|
|
57
|
+
- 13.86736364185117
|
|
58
|
+
- 25.98326925075341
|
|
59
|
+
- 8.794589227884572
|
|
60
|
+
- -1.6632060111195983
|
|
61
|
+
- 35.67508447620737
|
|
62
|
+
- -8.705782739788873
|
|
63
|
+
- -5.248436794565741
|
|
64
|
+
- 70.39736707678503
|
|
65
|
+
- 29.398501871953258
|
|
66
|
+
- -16.309873918239095
|
|
67
|
+
- 29.294223164727043
|
|
68
|
+
- 35.18504698811759
|
|
69
|
+
- -12.084952549931714
|
|
70
|
+
- - 30.362228679034846
|
|
71
|
+
- -15.226178166718157
|
|
72
|
+
- 39.565433715841124
|
|
73
|
+
- 13.219845479736946
|
|
74
|
+
- 15.182255104911214
|
|
75
|
+
- 26.40117426997817
|
|
76
|
+
- 8.794589227884572
|
|
77
|
+
- 0.45797231890703927
|
|
78
|
+
- 16.766566503702535
|
|
79
|
+
- 22.43886680240547
|
|
80
|
+
- -6.653377084396858
|
|
81
|
+
- 32.92941257099505
|
|
82
|
+
- 28.532196394531553
|
|
83
|
+
- -12.37370024273459
|
|
84
|
+
- 63.05738281491582
|
|
85
|
+
- 39.28729465482644
|
|
86
|
+
- -12.084952549931714
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Install dependencies first with `uv`:
|
|
2
|
+
|
|
3
|
+
```sh
|
|
4
|
+
uv sync --group dev --group docs
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
To test localy:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
uv run mkdocs serve --clean
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
To build:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
uv run mkdocs build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
To test build:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
uv run python -m http.server 8000 --directory site
|
|
23
|
+
```
|