Opening websockets to robots across different networks

57 views
Skip to first unread message

Nick Sweet

unread,
Jul 11, 2017, 3:20:01 PM7/11/17
to Robot Web Tools
Hi all,

I'm wondering if anyone has any suggestions for opening websockets to robots at arbitrary locations (but have internet connection). 

Say I have clients on Network A loading a website provided by a server hosted on Amazon EC2. Using roslibjs, the clients attempt to open websockets to robots on Network B, but the websocket URL to connect to rosbridge (e.g. `ws://robot_1.local:9090`) is ill-defined because the robots don't have a public IP. 

What's the best way to set up communication between the robots and clients across arbitrary networks? I was thinking of setting up port forwarding through the EC2 instance (e.g. `ws://STATIC_HOST:9091` for robot 1, `ws://STATIC_HOST:9092` for robot 2...), but that seems a inelegant since I have to set up dedicated port forwarding for each robot. Nevertheless, I've been looking into websocket tunnel tools, but there's a bunch out there and none of them have worked for me yet. Does anyone have a clean solution they could recommend?

Thanks!

Nick

Jihoon Lee

unread,
Jul 13, 2017, 3:43:56 AM7/13/17
to robot-w...@googlegroups.com
Hi Nick,

There is no out-of-box solution that connects a robot at an arbitrary location as far as I know. The easiest way of connecting robots in the other network would be either VPN or port forwarding as you described.

You can also try to implement like a "Robot Portal" in AWS where robots and users can meet and exchange. To do this, you need to implement something like rosbridge_client. This can be an option too. It may require some implementation effort, but it shouldn't be too hard to do.

Cheers,
Jihoon


--
You received this message because you are subscribed to the Google Groups "Robot Web Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robot-web-tools+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chad Jenkins

unread,
Jul 13, 2017, 10:02:27 AM7/13/17
to robot-w...@googlegroups.com


STUN might also provide another option:

https://en.m.wikipedia.org/wiki/STUN

-Chad

Nick Sweet

unread,
Jul 16, 2017, 3:42:37 PM7/16/17
to Robot Web Tools
Thanks for the responses! I'll post a detailed solution once I have things worked out.


On Thursday, 13 July 2017 09:02:27 UTC-5, Chad Jenkins wrote:


STUN might also provide another option:

https://en.m.wikipedia.org/wiki/STUN

-Chad

On Jul 13, 2017 3:43 AM, "Jihoon Lee" <jihoon...@gmail.com> wrote:
Hi Nick,

There is no out-of-box solution that connects a robot at an arbitrary location as far as I know. The easiest way of connecting robots in the other network would be either VPN or port forwarding as you described.

You can also try to implement like a "Robot Portal" in AWS where robots and users can meet and exchange. To do this, you need to implement something like rosbridge_client. This can be an option too. It may require some implementation effort, but it shouldn't be too hard to do.

Cheers,
Jihoon

On Tue, Jul 11, 2017 at 9:20 PM, Nick Sweet <nck...@gmail.com> wrote:
Hi all,

I'm wondering if anyone has any suggestions for opening websockets to robots at arbitrary locations (but have internet connection). 

Say I have clients on Network A loading a website provided by a server hosted on Amazon EC2. Using roslibjs, the clients attempt to open websockets to robots on Network B, but the websocket URL to connect to rosbridge (e.g. `ws://robot_1.local:9090`) is ill-defined because the robots don't have a public IP. 

What's the best way to set up communication between the robots and clients across arbitrary networks? I was thinking of setting up port forwarding through the EC2 instance (e.g. `ws://STATIC_HOST:9091` for robot 1, `ws://STATIC_HOST:9092` for robot 2...), but that seems a inelegant since I have to set up dedicated port forwarding for each robot. Nevertheless, I've been looking into websocket tunnel tools, but there's a bunch out there and none of them have worked for me yet. Does anyone have a clean solution they could recommend?

Thanks!

Nick

--
You received this message because you are subscribed to the Google Groups "Robot Web Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robot-web-too...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Robot Web Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robot-web-too...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages