-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add Haply device API with force feedback and teleoperation demo #3873
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
Open
mingxueg-nv
wants to merge
45
commits into
isaac-sim:main
Choose a base branch
from
mingxueg-nv:mingxueg/add_haply_devices_for_teleop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,242
−2
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
f73c475
draft demo with haply teleop with contact sensor
mingxueg-nv 4220be1
Update Ik control
mingxueg-nv e3beabd
enhance scene config and log
mingxueg-nv 043878d
Merge branch 'isaac-sim:main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv af0ee44
fix format
mingxueg-nv 128c792
Remove unnecessary log
mingxueg-nv d914e24
resolve comments from greptile
mingxueg-nv 8a46ce3
Update timeout check method
mingxueg-nv 8a5a2f8
improve thread safety and cleanup in Haply device
mingxueg-nv 635373e
Use more stable method to check connect
mingxueg-nv 4a50a6f
Fix thread safety and device disconnection detection
mingxueg-nv d85c938
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv 243b8ae
Update source/isaaclab/isaaclab/devices/haply/se3_haply.py
mingxueg-nv 544e41a
Add test script for haply device
mingxueg-nv 13c4047
fixed ik joints index issue
mingxueg-nv 02179a6
integration with DeviceBase interface and add dependencies
mingxueg-nv 8e08403
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv accfd8c
Update teleop args
mingxueg-nv 20d99e3
resolve greptile-apps' comments
mingxueg-nv 7636046
Update scripts/demos/haply_teleoperation.py
mingxueg-nv d0a37dc
fix: Address code review feedback
mingxueg-nv fe6bb0f
Update source/isaaclab/isaaclab/devices/haply/se3_haply.py
mingxueg-nv 0b6e1ab
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv ce26b30
refactor(devices): add force/wrench feedback interface to DeviceBase
mingxueg-nv 321cbd2
fix: remove quaternion scaling and migrate to push_force interface
mingxueg-nv 6bba060
docs: add HaplyDevice to API documentation
mingxueg-nv d0bc5bb
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv 707ece1
refactor: add clarifying comments to address code review concerns
mingxueg-nv 941fe76
docs: add comprehensive Haply teleoperation documentation and removed…
mingxueg-nv 4a65aa5
refactor: address code review feedback and improve consistency
mingxueg-nv 528db32
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv 9105f73
fix: resolve all critical threading and safety issues
mingxueg-nv d1dd6bb
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv bd78c0f
Update the table pos
mingxueg-nv 6c6a0d6
Update image shown in docs
mingxueg-nv 19ba6c7
Merge branch 'main' into mingxueg/add_haply_devices_for_teleop
mingxueg-nv 050b80d
devices: extend push_force to support dict format and position selection
mingxueg-nv 1b88184
fix: address threading and data handling concerns
mingxueg-nv c6bde6a
refactor: simplify push_force to use tensor indexing
mingxueg-nv 47a90fd
Update source/isaaclab/isaaclab/devices/haply/se3_haply.py
mingxueg-nv 9d916ab
Update source/isaaclab/isaaclab/devices/haply/se3_haply.py
mingxueg-nv ca11f0e
docs: confirm thread-safe implementation in HaplyDevice
mingxueg-nv 86c5265
Updated code format
mingxueg-nv 26cce57
docs: confirm thread-safe implementation in HaplyDevice
mingxueg-nv f46776e
fix: address threading and data handling concerns
mingxueg-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,240 @@ | ||
| .. _haply-teleoperation: | ||
|
|
||
| Setting up Haply Teleoperation | ||
| =============================== | ||
|
|
||
| .. currentmodule:: isaaclab | ||
|
|
||
| `Haply Devices`_ provides haptic devices that enable intuitive robot teleoperation with | ||
| directional force feedback. The Haply Inverse3 paired with the VerseGrip creates an | ||
| end-effector control system with force feedback capabilities. | ||
|
|
||
| Isaac Lab supports Haply devices for teleoperation workflows that require precise spatial | ||
| control with haptic feedback. This enables operators to feel contact forces during manipulation | ||
| tasks, improving control quality and task performance. | ||
|
|
||
| This guide explains how to set up and use Haply devices with Isaac Lab for robot teleoperation. | ||
|
|
||
| .. _Haply Devices: https://haply.co/ | ||
|
|
||
|
|
||
| Overview | ||
| -------- | ||
|
|
||
| Using Haply with Isaac Lab involves the following components: | ||
|
|
||
| * **Isaac Lab** simulates the robot environment and streams contact forces back to the operator | ||
|
|
||
| * **Haply Inverse3** provides 3-DOF position tracking and force feedback in the operator's workspace | ||
|
|
||
| * **Haply VerseGrip** adds orientation sensing and button inputs for gripper control | ||
|
|
||
| * **Haply SDK** manages WebSocket communication between Isaac Lab and the Haply hardware | ||
|
|
||
| This guide will walk you through: | ||
|
|
||
| * :ref:`haply-system-requirements` | ||
| * :ref:`haply-installation` | ||
| * :ref:`haply-device-setup` | ||
| * :ref:`haply-running-demo` | ||
| * :ref:`haply-troubleshooting` | ||
|
|
||
|
|
||
| .. _haply-system-requirements: | ||
|
|
||
| System Requirements | ||
| ------------------- | ||
|
|
||
| Hardware Requirements | ||
| ~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| * **Isaac Lab Workstation** | ||
|
|
||
| * Ubuntu 22.04 or Ubuntu 24.04 | ||
| * Hardware requirements for 200Hz physics simulation: | ||
|
|
||
| * CPU: 8-Core Intel Core i7 or AMD Ryzen 7 (or higher) | ||
| * Memory: 32GB RAM (64GB recommended) | ||
| * GPU: RTX 3090 or higher | ||
|
|
||
| * Network: Same local network as Haply devices for WebSocket communication | ||
mingxueg-nv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * **Haply Devices** | ||
|
|
||
| * Haply Inverse3 - Haptic device for position tracking and force feedback | ||
| * Haply VerseGrip - Wireless controller for orientation and button inputs | ||
| * Both devices must be powered on and connected to the Haply SDK | ||
|
|
||
| Software Requirements | ||
| ~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| * Isaac Lab (follow the :ref:`installation guide <installation>`) | ||
| * Haply SDK (provided by Haply Robotics) | ||
| * Python 3.10+ | ||
| * ``websockets`` Python package (automatically installed with Isaac Lab) | ||
|
|
||
|
|
||
| .. _haply-installation: | ||
|
|
||
| Installation | ||
| ------------ | ||
|
|
||
| 1. Install Isaac Lab | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Follow the Isaac Lab :ref:`installation guide <installation>` to set up your environment. | ||
|
|
||
| The ``websockets`` dependency is automatically included in Isaac Lab's requirements. | ||
|
|
||
| 2. Install Haply SDK | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Download the Haply SDK from the `Haply Devices`_ website. | ||
| Install the SDK software and configure the devices. | ||
|
|
||
| 3. Verify Installation | ||
| ~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Test that your Haply devices are detected by the Haply Device Manager. | ||
| You should see both Inverse3 and VerseGrip as connected. | ||
|
|
||
|
|
||
| .. _haply-device-setup: | ||
|
|
||
| Device Setup | ||
| ------------ | ||
|
|
||
| 1. Physical Setup | ||
| ~~~~~~~~~~~~~~~~~ | ||
|
|
||
| * Place the Haply Inverse3 on a stable surface | ||
| * Ensure the VerseGrip is charged and paired | ||
| * Position yourself comfortably to reach the Inverse3 workspace | ||
| * Keep the workspace clear of obstacles | ||
|
|
||
| 2. Start Haply SDK | ||
| ~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Launch the Haply SDK according to Haply's documentation. The SDK typically: | ||
|
|
||
| * Runs a WebSocket server on ``localhost:10001`` | ||
| * Streams device data at 200Hz | ||
| * Displays connection status for both devices | ||
|
|
||
| 3. Test Communication | ||
| ~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| You can test the WebSocket connection using the following Python script: | ||
|
|
||
| .. code:: python | ||
|
|
||
| import asyncio | ||
| import websockets | ||
| import json | ||
|
|
||
| async def test_haply(): | ||
| uri = "ws://localhost:10001" | ||
| async with websockets.connect(uri) as ws: | ||
| response = await ws.recv() | ||
| data = json.loads(response) | ||
| print("Inverse3:", data.get("inverse3", [])) | ||
| print("VerseGrip:", data.get("wireless_verse_grip", [])) | ||
|
|
||
| asyncio.run(test_haply()) | ||
|
|
||
| You should see device data streaming from both Inverse3 and VerseGrip. | ||
|
|
||
|
|
||
| .. _haply-running-demo: | ||
|
|
||
| Running the Demo | ||
| ---------------- | ||
|
|
||
| The Haply teleoperation demo showcases robot manipulation with force feedback using | ||
| a Franka Panda arm. | ||
|
|
||
| Basic Usage | ||
| ~~~~~~~~~~~ | ||
|
|
||
| .. tab-set:: | ||
| :sync-group: os | ||
|
|
||
| .. tab-item:: :icon:`fa-brands fa-linux` Linux | ||
| :sync: linux | ||
|
|
||
| .. code:: bash | ||
|
|
||
| # Ensure Haply SDK is running | ||
| ./isaaclab.sh -p scripts/demos/haply_teleoperation.py --websocket_uri ws://localhost:10001 --pos_sensitivity 1.65 | ||
|
|
||
| .. tab-item:: :icon:`fa-brands fa-windows` Windows | ||
| :sync: windows | ||
|
|
||
| .. code:: batch | ||
|
|
||
| REM Ensure Haply SDK is running | ||
| isaaclab.bat -p scripts\demos\haply_teleoperation.py --websocket_uri ws://localhost:10001 --pos_sensitivity 1.65 | ||
|
|
||
| The demo will: | ||
|
|
||
| 1. Connect to the Haply devices via WebSocket | ||
| 2. Spawn a Franka Panda robot and a cube in simulation | ||
| 3. Map Haply position to robot end-effector position | ||
| 4. Stream contact forces back to the Inverse3 for haptic feedback | ||
|
|
||
| Controls | ||
| ~~~~~~~~ | ||
|
|
||
| * **Move Inverse3**: Controls the robot end-effector position | ||
| * **VerseGrip Button A**: Open gripper | ||
| * **VerseGrip Button B**: Close gripper | ||
| * **VerseGrip Button C**: Rotate end-effector by 60° | ||
|
|
||
| Advanced Options | ||
| ~~~~~~~~~~~~~~~~ | ||
|
|
||
| Customize the demo with command-line arguments: | ||
|
|
||
| .. code:: bash | ||
|
|
||
| # Use custom WebSocket URI | ||
| ./isaaclab.sh -p scripts/demos/haply_teleoperation.py \ | ||
| --websocket_uri ws://192.168.1.100:10001 | ||
|
|
||
| # Adjust position sensitivity (default: 1.0) | ||
| ./isaaclab.sh -p scripts/demos/haply_teleoperation.py \ | ||
| --websocket_uri ws://localhost:10001 \ | ||
| --pos_sensitivity 2.0 | ||
|
|
||
| Demo Features | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
| * **Workspace Mapping**: Haply workspace is mapped to robot reachable space with safety limits | ||
| * **Inverse Kinematics**: Inverse Kinematics (IK) computes joint positions for desired end-effector pose | ||
| * **Force Feedback**: Contact forces from end-effector sensors are sent to Inverse3 for haptic feedback | ||
|
|
||
|
|
||
| .. _haply-troubleshooting: | ||
|
|
||
| Troubleshooting | ||
| --------------- | ||
|
|
||
| No Haptic Feedback | ||
| ~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| **Problem**: No haptic feedback felt on Inverse3 | ||
|
|
||
| Solutions: | ||
|
|
||
| * Verify Inverse3 is the active device in Haply SDK | ||
| * Check contact forces are non-zero in simulation (try grasping the cube) | ||
| * Ensure ``limit_force`` is not set too low (default: 2.0N) | ||
|
|
||
|
|
||
| Next Steps | ||
| ---------- | ||
|
|
||
| * **Customize the demo**: Modify the workspace mapping or add custom button behaviors | ||
| * **Implement your own controller**: Use :class:`~isaaclab.devices.HaplyDevice` in your own scripts | ||
|
|
||
| For more information on device APIs, see :class:`~isaaclab.devices.HaplyDevice` in the API documentation. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.