This guide explains how to run Teledex for retrieving pose data directly from your iOS device without requiring MuJoCo. Follow the steps below to set it up and get started in a few minutes.
-
Download the iOS App:
Install the MuJoCo AR app from the App Store here. -
Install the Python Package:
Run the following command to install the Teledex Python package:pip install teledex
Create a connection between your Python program and the iOS device.
from teledex import Session
# Initialize the connector
connector = Session(port=8888, debug=False) # Customize the port if necessaryBegin listening for data from your iOS device.
connector.start()- Open the MuJoCo AR app on your iOS device.
- Enter the IP address and port displayed in your Python console.
- Tap "Connect" on the app.
Once connected, retrieve the latest position, rotation, button, and toggle states from the iOS device:
data = connector.get_latest_data()
print(data)
# Output: {"position": [x, y, z], "rotation": [[r11, r12, r13], [r21, r22, r23], [r31, r32, r33]], "button": True/False, "toggle": True/False}- If you experience latency, connect your PC to your device's mobile hotspot. This establishes a local WebSocket connection, reducing delay.
- Avoid blocking the camera with your fingers.
- Adjust the app's tracking sensitivity through the
scaleparameter if using MuJoCo features later.
How can I quickly test it in simulation?
Run a script using the provided example demo/flexible_setup.py to test device connectivity and data retrieval.
