0
$\begingroup$

Rosanswers logo

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.


Originally posted by Mehdi. on ROS Answers with karma: 3339 on 2014-10-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by ahendrix with karma: 47576 on 2014-10-15

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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