Skip to content

Commit 7d21d99

Browse files
fix: fixed missing conda imports and README
1 parent 28f9af8 commit 7d21d99

8 files changed

Lines changed: 24 additions & 44 deletions

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ conda activate piper-teleop
4141

4242
### 3. Clone and Install Meta Quest Teleop Package
4343

44-
Clone the Meta Quest teleoperation repository inside this example directory and install it:
44+
Clone the Meta Quest teleoperation repository and install it:
45+
46+
**NOTE**: Make sure you're installing it inside the `piper-teleop` conda environment.
4547

4648
```bash
4749
git clone https://github.com/NeuracoreAI/meta_quest_teleop.git
@@ -73,6 +75,8 @@ AgileX Piper Robot
7375

7476
## Usage
7577

78+
**IMPORTANT NOTE:** Make sure that you have followed the instructions to set up the meta quest (according to [meta_quest_teleop](https://github.com/NeuracoreAI/meta_quest_teleop) README instructions) and that your equipment are functioning before starting the examples. Same applies to the piper robot!
79+
7680
### 1. Tune Teleoperation Parameters
7781

7882
**Script**: `examples/1_tune_teleop_params.py`
@@ -241,10 +245,6 @@ example_agilex/
241245

242246
## Troubleshooting
243247

244-
### Python 3.10 issues
245-
246-
Python 3.10 has known compatibility issues with some dependencies (e.g. certain versions of NumPy, PyTorch, or other packages). If you run into import errors, version conflicts, or odd runtime behaviour, try using Python 3.11 or 3.12 instead.
247-
248248
### Import Errors
249249

250250
- Ensure conda environment is activated: `conda activate piper-teleop`
@@ -255,20 +255,22 @@ Python 3.10 has known compatibility issues with some dependencies (e.g. certain
255255
cd meta_quest_teleop
256256
pip install -e .
257257
cd ..
258+
pip show meta_quest_teleop
258259
```
259260

260261
### Robot Communication Issues
261262

262263
- Verify CAN interface is active: `ip link show can0`
263264
- You can activate CAN interface with: `bash scripts/piper/can_activate.sh can0 1000000`
265+
- **NOTE:** you'll most probably need to activate the CAN interface when you first connect your robot to your machine.
264266
- Check robot power and CAN bus connection
265267
- Ensure robot is in the correct mode for control
266268

267269
### Neuracore Connection Issues
268270

269271
- Verify you're logged in: `neuracore login`
270272
- Check network connectivity to Neuracore servers
271-
- Verify dataset/run names are correct
273+
- Verify dataset names/run names/model paths are correct
272274

273275
## Safety Notes
274276

environment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies:
1717
- matplotlib
1818
- neuracore
1919
- neuracore_types
20+
- pyrealsense2
2021

2122

2223

examples/1_tune_teleop_params.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
# Add parent directory to path to import pink_ik_solver and piper_controller
2121
sys.path.insert(0, str(Path(__file__).parent.parent))
2222

23-
# Add meta_quest_teleop to path
24-
sys.path.insert(0, str(Path(__file__).parent.parent / "meta_quest_teleop"))
25-
26-
2723
from common.configs import (
2824
CAMERA_FRAME_STREAMING_RATE,
2925
CONTROLLER_BETA,

examples/2_collect_teleop_data_with_neuracore.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
# Add parent directory to path to import pink_ik_solver and piper_controller
2323
sys.path.insert(0, str(Path(__file__).parent.parent))
2424

25-
# Add meta_quest_teleop to path
26-
sys.path.insert(0, str(Path(__file__).parent.parent / "meta_quest_teleop"))
27-
28-
2925
from common.configs import (
3026
CAMERA_FRAME_STREAMING_RATE,
3127
CONTROLLER_BETA,

examples/4_rollout_neuracore_policy.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
# Add parent directory to path to import pink_ik_solver and piper_controller
2525
sys.path.insert(0, str(Path(__file__).parent.parent))
2626

27-
# Add meta_quest_teleop to path
28-
sys.path.insert(0, str(Path(__file__).parent.parent / "meta_quest_teleop"))
29-
3027
from common.configs import (
3128
CAMERA_FRAME_STREAMING_RATE,
3229
CAMERA_LOGGING_NAME,
@@ -844,15 +841,12 @@ def update_visualization(
844841
)
845842
visualizer.set_go_home_callback(lambda: home_robot(data_manager, robot_controller))
846843
visualizer.set_run_policy_callback(
847-
lambda: (
848-
run_policy(
849-
data_manager, policy, policy_state, visualizer, model_input_order
850-
),
851-
None,
852-
)[1]
844+
lambda: run_policy(
845+
data_manager, policy, policy_state, visualizer, model_input_order
846+
)
853847
)
854848
visualizer.set_start_policy_execution_callback(
855-
lambda: (start_policy_execution(data_manager, policy_state), None)[1]
849+
lambda: start_policy_execution(data_manager, policy_state)
856850
)
857851
visualizer.set_run_and_start_policy_execution_callback(
858852
lambda: run_and_start_policy_execution(

examples/common/robot_visualizer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def update_toggle_robot_enabled_status(self, enabled: bool) -> None:
168168
)
169169

170170
def set_toggle_robot_enabled_status_callback(
171-
self, callback: Callable[[], None]
171+
self, callback: Callable[[], Any]
172172
) -> None:
173173
"""Set callback for toggle robot enabled status button.
174174
@@ -723,7 +723,7 @@ def get_ghost_robot_visibility(self) -> bool:
723723
return self._ghost_robot_urdf.show_visual
724724
return False
725725

726-
def set_run_policy_callback(self, callback: Callable[[], None]) -> None:
726+
def set_run_policy_callback(self, callback: Callable[[], Any]) -> None:
727727
"""Set callback for Run Policy button.
728728
729729
Args:
@@ -732,7 +732,7 @@ def set_run_policy_callback(self, callback: Callable[[], None]) -> None:
732732
if self._run_policy_button is not None:
733733
self._run_policy_button.on_click(lambda _: callback())
734734

735-
def set_start_policy_execution_callback(self, callback: Callable[[], None]) -> None:
735+
def set_start_policy_execution_callback(self, callback: Callable[[], Any]) -> None:
736736
"""Set callback for Execute Policy button.
737737
738738
Args:
@@ -742,7 +742,7 @@ def set_start_policy_execution_callback(self, callback: Callable[[], None]) -> N
742742
self._start_policy_execution_button.on_click(lambda _: callback())
743743

744744
def set_run_and_start_policy_execution_callback(
745-
self, callback: Callable[[], None]
745+
self, callback: Callable[[], Any]
746746
) -> None:
747747
"""Set callback for Run and Execute Policy button.
748748
@@ -752,7 +752,7 @@ def set_run_and_start_policy_execution_callback(
752752
if self._run_and_start_policy_execution_button is not None:
753753
self._run_and_start_policy_execution_button.on_click(lambda _: callback())
754754

755-
def set_play_policy_callback(self, callback: Callable[[], None]) -> None:
755+
def set_play_policy_callback(self, callback: Callable[[], Any]) -> None:
756756
"""Set callback for Play Policy button.
757757
758758
Args:
@@ -761,7 +761,7 @@ def set_play_policy_callback(self, callback: Callable[[], None]) -> None:
761761
if self._play_policy_button is not None:
762762
self._play_policy_button.on_click(lambda _: callback())
763763

764-
def set_execution_mode_callback(self, callback: Callable[[], None]) -> None:
764+
def set_execution_mode_callback(self, callback: Callable[[], Any]) -> None:
765765
"""Set callback for execution mode dropdown.
766766
767767
Args:
@@ -770,7 +770,7 @@ def set_execution_mode_callback(self, callback: Callable[[], None]) -> None:
770770
if self._execution_mode_dropdown is not None:
771771
self._execution_mode_dropdown.on_update(lambda _: callback())
772772

773-
def set_enable_robot_callback(self, callback: Callable[[], None]) -> None:
773+
def set_enable_robot_callback(self, callback: Callable[[], Any]) -> None:
774774
"""Set callback for Enable Robot button.
775775
776776
Args:
@@ -779,7 +779,7 @@ def set_enable_robot_callback(self, callback: Callable[[], None]) -> None:
779779
if self._enable_robot_handle is not None:
780780
self._enable_robot_handle.on_click(lambda _: callback())
781781

782-
def set_disable_robot_callback(self, callback: Callable[[], None]) -> None:
782+
def set_disable_robot_callback(self, callback: Callable[[], Any]) -> None:
783783
"""Set callback for Disable Robot button.
784784
785785
Args:
@@ -788,7 +788,7 @@ def set_disable_robot_callback(self, callback: Callable[[], None]) -> None:
788788
if self._disable_robot_handle is not None:
789789
self._disable_robot_handle.on_click(lambda _: callback())
790790

791-
def set_emergency_stop_callback(self, callback: Callable[[], None]) -> None:
791+
def set_emergency_stop_callback(self, callback: Callable[[], Any]) -> None:
792792
"""Set callback for Emergency Stop button.
793793
794794
Args:
@@ -797,7 +797,7 @@ def set_emergency_stop_callback(self, callback: Callable[[], None]) -> None:
797797
if self._emergency_stop_handle is not None:
798798
self._emergency_stop_handle.on_click(lambda _: callback())
799799

800-
def set_go_home_callback(self, callback: Callable[[], None]) -> None:
800+
def set_go_home_callback(self, callback: Callable[[], Any]) -> None:
801801
"""Set callback for Go Home button.
802802
803803
Args:

examples/common/threads/quest_reader.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
"""Quest reader thread - reads controller data and manages teleop state."""
22

3-
import sys
43
import time
54
import traceback
6-
from pathlib import Path
75

8-
# Add meta_quest_teleop to path
9-
sys.path.insert(0, str(Path(__file__).parent.parent / "meta_quest_teleop"))
106
from common.configs import CONTROLLER_DATA_RATE, GRIP_THRESHOLD
117
from common.data_manager import DataManager, RobotActivityState
128
from meta_quest_teleop.reader import MetaQuestReader

scripts/oculus/monitor_hand_movement.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#!/usr/bin/env python3
22
"""Monitor Meta Quest right hand controller movement and display flags for significant changes."""
33

4-
import sys
54
import time
65
from collections import deque
7-
from pathlib import Path
86

97
import numpy as np
10-
from scipy.spatial.transform import Rotation
11-
12-
sys.path.insert(0, str(Path(__file__).parent.parent.parent / "meta_quest_teleop"))
13-
148
from meta_quest_teleop.reader import MetaQuestReader
9+
from scipy.spatial.transform import Rotation
1510

1611

1712
class MovementMonitor:

0 commit comments

Comments
 (0)