ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

rosbridge websocket server over internet

asked 2020-06-19 12:23:13 -0600

parzival gravatar image

I am working on a project where I need to send and receive data remotely from a website to the robot. I've read and implemented rosbridge_server on my localhost but want to run the server online on the internet, so that it is accessible anywhere. What is a good solution/implementation for the same?

I referred to this question, but I think this is only a workaround and not a good solution. Not sure why ssh -R tunneling is required.

edit retag flag offensive close merge delete

Comments

1

Not sure I completely understand your question. You want to run rosbridge on a remote internet connected machine, or you want to simply have internet access to the rosbridge server on your local machine?

If the later, it is not complicated to get rosbridge running so a browser can connect over internet to your robot/ROS system.

billy gravatar image billy  ( 2020-06-21 18:10:00 -0600 )edit

What I want is the robot to send odometry and map data to a user located anywhere in the world via internet. Right now I'm converting ros messages to JSON and have written my own python websocket client which connects to a websocket server, and displays it on the webpage. But I was wondering if rosbridge_suite can be used instead?

parzival gravatar image parzival  ( 2020-06-26 00:22:27 -0600 )edit

Yes. Rosbridge can be used for that. I have posted code before that I have used. Although not tested outside of USA. I have had issues with a particular ISP(AT&T) seemingly block access from residential access in multiple states while it works fine on AT&T connected cell phones. Not sure why.

https://answers.ros.org/question/3150...

billy gravatar image billy  ( 2020-06-28 17:06:02 -0600 )edit

My bot won't have a static public IP, so I won't be able to start a server out of my bot. I'll need the server to be somewhere else, with the robot having a script for websocket client. But not sure how to use that with rosbridge_suite. So my robot will be connected to the internet via wifi, and the websocket server will be on xyz.com let's say, and I want to be able send robot data to user via xyz.com. Can you please help me understand how can I do that?

parzival gravatar image parzival  ( 2020-06-30 02:24:17 -0600 )edit

Ah, sorry. Can't help with that setup. I'm not a SW guy and just do this robot stuff for learning.

I have had mine setup to update a webpage at a static address with an updated link when the IP address of the robot changed. So to get to robot you go to XYZ.com/robot.html and click on the link that takes you to the robot IP address. XYZ.com/robot.html gets updated via FTP whenever the robot IP address changes. But that's just how I did it. It's a little janky and probably not workable for you.

billy gravatar image billy  ( 2020-06-30 12:14:58 -0600 )edit

I have this same question.

So... the rosbridge on the robot have to send data to "the cloud" and your browser will read the data connecting to that cloud server, right?

Mauricio Pena gravatar image Mauricio Pena  ( 2020-10-21 21:22:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-11 06:12:40 -0600

siddharthcb gravatar image

Its been quite long since this thread came up but hope you have figured your way out of this problem. I was facing the same challenge and I will tell you the solution that is working for me.

Firstly, rosbridge websocket is compatible with ros/non-ros web interfaces. If everything is working well on your localhost, all you need to do is setup a VPN on the client side and join to your bots network. For this, I assume your bot and your client side has a stable internet connection.

After VPN connection is successful, If you are able to:

ping <your_bots_ip>

Then, everything will work fine for you

you can make use of roslibpy to send/receive the data from the web interface. Remember the IP address you will be sending/recieving will be the bots IP.

Talking about the vpn, since my client side was windows, I used wireguard VPN. However, if your client side is Linux/arduino, I suggest you to checkout husarnet which is very easy to implement even if you have a non-static internet connection. Hope this helps!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-19 12:23:13 -0600

Seen: 2,869 times

Last updated: Oct 11 '21