Teleoperation from anywhere in the world
Control your robot over the internet using ngrok
Prerequisites
Before starting, make sure you have the following:
- A control module set up, connected to the internet, and running the phosphobot server. Learn how to set up your control module.
- An ngrok account. Sign up here (or use an alternative like Cloudflare Tunnel).
- The ngrok CLI installed on your device. Download it here
1. Authenticate ngrok
To use ngrok, you need to authenticate your account. Open a terminal and run the following command:
Replace YOUR_AUTH_TOKEN
with the token provided in your ngrok dashboard.
2. Create an ngrok Tunnel for Your Local Server
-
Turn on your control module and ensure your phosphobot server is running.
-
SSH into your phosphobot. By default, the password is
password123
-
Run the following command to create a tunnel:
This command tells ngrok to forward traffic from the internet to your local server running on port 80.
-
Once the tunnel is active, ngrok will display a forwarding URL in the terminal, such as:
This URL is publicly accessible from anywhere in the world and will remain active while the ngrok tunnel is running. Turn off the control module to stop the tunnel.
3. Access Your Teleoperation App Remotely
- Copy the ngrok
https://
URL displayed in your terminal (e.g.,https://abc123.ngrok.io
). - Share this URL with users who need remote access to your teleoperation app.
- Open the URL in a browser to access the Admin panel.
- In the Meta Quest app, go to
Settings
and enter the ngrok URL to connect.
4. Secure Your Tunnel
To secure your tunnel:
-
Add basic authentication Run the following command to require a username and password to access the tunnel:
Replace
username
andpassword
with your desired credentials. -
Alternatively, you can restrict access to specific IP addresses.
- Go to the ngrok dashboard
- Use the IP restrictions feature in the dashboard.
5. Monitor Traffic (Optional)
Ngrok provides a web interface for inspecting traffic and requests. To access it:
- Open your browser and go to
http://localhost:4040
. - Here, you can view detailed logs of incoming requests and responses.
What’s Next?
Now that your teleoperation app is accessible remotely, you can:
- Share the ngrok URL with collaborators for real-time teleoperation.
- Record datasets remotely and upload them to your Hugging Face account.
- Train AI models using the data collected from remote sessions.
Train Your First AI Model
Learn how to use your recorded datasets to train your first AI model.
Was this page helpful?