|
| 1 | +# Development Workflow |
| 2 | + |
| 3 | +## Table of Contents |
| 4 | + |
| 5 | +- [Prerequisites](#prerequisites) |
| 6 | +- [Setup (Linux and Windows)](#setup-linux-and-windows) |
| 7 | +- [Setup (Raspberry Pi)](#setup-raspberry-pi) |
| 8 | +- [Run Demos](#run-demos) |
| 9 | + - [Start Dora Daemon](#start-dora-daemon) |
| 10 | + - [Run a simple "finger angle" gesture demo in simulation](#run-a-simple-finger-angle-gesture-demo-in-simulation) |
| 11 | + - [Run Python Example](#run-python-example) |
| 12 | + - [Run Demo with Physical Hands](#run-demo-with-physical-hands) |
| 13 | +- [Appendix](#appendix) |
| 14 | + - [Install Microsoft Visual C++ (MSVC) Build Tools](#install-microsoft-visual-c-msvc-build-tools) |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +Install the following tools: |
| 19 | + |
| 20 | +- Install Pixi: https://pixi.prefix.dev/latest/installation/. |
| 21 | + - On Windows, to use pixi in Git Bash, add `export PATH="$HOME/.pixi/bin:$PATH"` to `~/.bashrc`, then run `source ~/.bashrc`. |
| 22 | + - Verify installation: `pixi --version` |
| 23 | +- Rust and cargo are installed via pixi (included in `pixi.toml`). |
| 24 | + |
| 25 | +## Setup (Linux and Windows) |
| 26 | + |
| 27 | +On regular Ubuntu (24.04) or Windows (Windows 11) machine, install the pixi environment (includes all Python dependencies). On Windows, Git Bash is tested. |
| 28 | + |
| 29 | +```bash |
| 30 | +# From repository root |
| 31 | +pixi install |
| 32 | +``` |
| 33 | + |
| 34 | +Optionally, verify the installation by running unit tests: |
| 35 | + |
| 36 | +```bash |
| 37 | +pixi run test-python-example |
| 38 | +pixi run test-demo |
| 39 | +pixi run test-ahcontrol |
| 40 | +``` |
| 41 | + |
| 42 | +Windows only (Rust / test-ahcontrol): `pixi.toml` adds `vs2022_win-64` for win-64, which activates the MSVC toolchain (via vcvars64) when you run `pixi shell` or `pixi run`. You must have Visual Studio or Build Tools installed first (see Appendix). If you get a linker error (e.g. "extra operand", "link.exe not found"), install Build Tools per the Appendix, then run `pixi install` to refresh the environment. As a fallback, run `pixi run test-ahcontrol` from "x64 Native Tools Command Prompt for VS" (Start menu). |
| 43 | + |
| 44 | +## Setup (Raspberry Pi) |
| 45 | +Planned and upcoming. |
| 46 | + |
| 47 | +## Run Demos |
| 48 | + |
| 49 | +Tested on Ubuntu 24.04 and Windows 11 (Git Bash). |
| 50 | + |
| 51 | +### Start Dora Daemon |
| 52 | + |
| 53 | +Start the dora daemon using pixi: |
| 54 | + |
| 55 | +```bash |
| 56 | +pixi run dora up |
| 57 | +``` |
| 58 | + |
| 59 | +### Run a simple "finger angle" gesture demo in simulation |
| 60 | + |
| 61 | +This runs `AHSimulation/examples/finger_angle_control.py` and streams targets into the MuJoCo viewer nodes. From the repository root: |
| 62 | + |
| 63 | +```bash |
| 64 | +pixi run dora-build-angle-simu # once |
| 65 | +pixi run dora-run-angle-simu |
| 66 | +``` |
| 67 | + |
| 68 | +Note: Dora/MuJoCo demos are tested on Linux and Windows. |
| 69 | + |
| 70 | +Start an interactive shell in the pixi environment: |
| 71 | +```bash |
| 72 | +pixi shell |
| 73 | +``` |
| 74 | +### Run Python Example |
| 75 | + |
| 76 | +See [PythonExample/README.md](../PythonExample/README.md). |
| 77 | + |
| 78 | +### Run Demo with Physical Hands |
| 79 | + |
| 80 | +See [Demo/README.md](../Demo/README.md). On Linux, add your user to the `dialout` group for serial port access. On Windows, edit the dataflow YAML for the COM port and `AHControl.exe` path. |
| 81 | + |
| 82 | +## Appendix |
| 83 | + |
| 84 | +### Install Microsoft Visual C++ (MSVC) Build Tools |
| 85 | + |
| 86 | +Required for building the Rust crate (`test-ahcontrol`) on Windows. The `vs2022_win-64` package in `pixi.toml` activates this toolchain automatically; you must install Build Tools first. Download and install: |
| 87 | + |
| 88 | +1. Download the Build Tools installer from: https://visualstudio.microsoft.com/visual-cpp-build-tools (or direct: https://aka.ms/vs/17/release/vs_BuildTools.exe). |
| 89 | + |
| 90 | +2. Run `vs_BuildTools.exe`. If the Visual Studio Installer is not installed, it will install first. |
| 91 | + |
| 92 | +3. In the installer, select the workload "Desktop development with C++". This includes the MSVC compiler, linker (`link.exe`), and Windows SDK. |
| 93 | + |
| 94 | +4. On the right-hand "Installation details" panel, ensure "MSVC v143 - VS 2022 C++ x64/x86 build tools" and "Windows 10/11 SDK" (or similar) are checked. Click Install. |
| 95 | + |
| 96 | +5. After installation, run `pixi install` (if needed) and `pixi run test-ahcontrol`. The `vs2022_win-64` package locates your install via vswhere and runs vcvars64 so the correct linker is on PATH. |
| 97 | + |
0 commit comments