0
$\begingroup$

Rosanswers logo

Background:
I am currently working on a project that wants to remotely receive video stream and send control commands to my ROS robot. I have it working perfectly in localhost by using rosbridge. It serves a web page on localhost:8181 that has video stream and a control panel.

Working ports on localhost:
Rosbridge port on 9090 (a bridge between ROS and JS web app)
mjpeg port on 8080 (for video stream)
web app port on 8181

My solution:
Should I use a server that has public IP to listen and send packages between control web app and ROS robot? I am thinking to forward my localhost ports to public server or use websocket to bind two ports.

No sure what to do. can anybody give some advises?


Originally posted by craigstar on ROS Answers with karma: 1 on 2017-09-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I am thinking to forward my localhost ports [..]

are you referring to NAT here, or some other way of 'forwarding'?

In any case: yes, you'll have to somehow open those ports on a routable IP. Whether that is done directly (ie: by giving your ROS machine a routable IP or by running the rosbridge nodes on a machine with a routable IP) or indirectly (ie: by using port forwarding in case of a NAT) should make no difference.


Originally posted by gvdhoorn with karma: 86574 on 2017-09-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2017-09-06:
Note that this is not strictly a ROS problem, but a general networking setup task.

I'm not saying this because we don't want to help you, but you'll find much more on the general internet about this topic then limiting your search to anything ROS related.

Comment by craigstar on 2017-09-06:
Hi, thank you for answering. when I started learning rosbridge, I thought rosbridge have built in API for serving online.(I think there are considerable needs). However, it works only in LAN.

running rosbridge online is a good idea, but again, how do I get topics/messages from robot. any examples?

Comment by gvdhoorn on 2017-09-06:\

However, it works only in LAN.

I'm rather sure that is not correct. See robotwebtools/demos fi: those are using rosbridge as well.

Furthermore, I've used rosbridge in a nr of "internet applications" (ie: where the consumer is not on the local net).

Comment by craigstar on 2017-09-06:
OK, I've got it working now. I used ssh -R tunnelling and it works pretty well. Thank you all the same

Comment by gvdhoorn on 2017-09-06:
I'm not sure I completely understand your last comment. The robotwebtools demos show that if you run your rosbridge nodes on a publically accessible (or routable) IP, it can be used 'over the internet'. I'm not entirely sure I understand why you'd need 'ssh -R tunneling'.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.