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

3 Computers Setting with ROS : Wifi -> (Wifi-Ethernet) -> Ethernet

asked 2014-10-15 20:55:29 -0500

Mehdi. gravatar image

I have a mobile robot with a wifi router plugged to it. And a workstation with no wifi. I also have a laptop with both Ethernet and wifi. I connect the laptop by Wifi to the robot, and to the Ethernet network by cable. The workstation is on that Ethernet network as well. After setting up ssh I could connect from my workstation directly to the robot and to the laptop as well. The problem is I can't run any GUI through ssh on an XServer (RViz especially) because of my Laptop having OpenGL 1.4 (It is weird because I can run RViz on the laptop directly). Even setting LIBGL_ALWAYS_SOFTWARE to 1 doesn't help and it keeps repeating the same error message:

libGL error: failed to load driver: swrast terminate called after throwing an instance of 'std::runtime_error'
what(): Your graphics driver does not support OpenGL 2.1. Please enable software rendering before running RViz (e.g. type 'export LIBGL_ALWAYS_SOFTWARE=1').

So my question is : is there a way to make some kind of bridge, so that I get an IP adress I can set on my workstation as URI Master which will automatically search for a ROS master on the robot's computer but going through the laptop?

I know that the easiest alternative would be to buy a Wifi dongle, but I am interested to know if what I described is possible.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-15 22:53:38 -0500

ahendrix gravatar image

Yes. You can configure linux as a router, to forward packets between one network and the other.

There are many, many guides on the internet about how to do this, but the core trick is to enable IP forwarding in the kernel:

echo 1 > sudo tee /proc/sys/net/ipv4/ip_forward
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-10-15 20:55:29 -0500

Seen: 642 times

Last updated: Oct 15 '14