Recently, I achieved remote control of the stretch_web_teleop using these instructions, and some additional debugging, so I thought I would post them in hopes of helping others with similar issues.
This will allow you to access the stretch from any wifi network, even University networks!
WARNING: This method does pose security risks. Proceed at your own risk.
- Make an ngrok account. Once made, ensure you follow installation instructions for linux as well as adding your authtoken to the ngrok.yml file.
- Navigate to
Universal Gateway -> Domains
in the ngrok website side panel. ClickNew Domain
and an automatic domain will be created. If you have a free account, you can only create/use 1 domain. - Change some network settings to get ngrok visible (this was important as I am on a university wifi). Type
sudo nano /etc/systemd/resolved.conf
in a linux terminal. In the file, navigate to a line that says something like#DNS=
. Remove the#
at the start to uncomment it. Also uncomment the line below it that says#FallbackDNS=
. To save, doctrl o
. Then hitenter
. Thenctrl x
to exit. This is the case for all nano files we will open. - Restart the DNS resolver. In the terminal type
sudo sytsemctl restart systemd-resolved
. - Change the config file with your ngrok information. Type
ngrok config edit
. In this file, copy in the following code. Ensure you fill in the information from the domain you created in the ngrok site forYOUR AUTH TOKEN
,YOUR DOMAIN
and create aUSERNAME
andPASSWORD
you would like for devices that try to access this site.
version: 3
agent:
authtoken: YOUR AUTH TOKEN
tunnels:
stretch-web-teleop:
proto: http
domain: YOUR DOMAIN
addr: localhost:443
basic_auth:
- “USERNAME:PASSWORD”
host_header: rewrite
inspect: true
- Now everything is configured. Launch the stretch_web_teleop by typing
colcon_cd stretch_web_teleop
in the terminal, then running./launch_interface
- In a new terminal, launch the ngrok tunnel using
ngrok start stretch-web-teleop
- You should now be able to access the site from anywhere using an address like
https://<YOUR_DOMAIN>/operator