Closed berezovskyi closed 5 years ago
https://superuser.com/questions/144453/virtualbox-guest-os-accessing-local-server-on-host-os this is the other way around, how to access the host from the VM
We have now a working connection to localhost:11311
forwarded to the VM running ROS via an SSH tunnel.
Now the issue is to cross-compile a ROS plugin, opened an issue in their repo: https://github.com/CoppeliaRobotics/v_repExtRosInterface/issues/28
Below are the instructions on how to open a tunnel. cc @likelion @albertohata @jramadeu @KRaizer @rssouza
The ROS plugin in a V-REP has a hardcoded V-REP URL pointing to http://localhost:11311
. V-REP cannot be 3D accelerated under a VM but ROS can only run under Ubuntu 16.04 (the one that supports Turtlebots). We mostly run Mac or Win on our machines.
Leo has suggested a very simple solution: use SSH to forward the ports via a tunnel:
ssh 192.168.56.101 -L11311:localhost:11311
This command shall be executed under the host machine. In order for the VM to respond:
roscore
must be up and listening on port 11311.NB! Remove and recreate the
vboxnet0
I/F under Virtualbox if you are unable to ping the machine. Also, Ubuntu comes without an SSH server by default, sosudo apt-get install openssh-server
might also be required.
Putting this one on hold till the Gateway the implemented (see #121).
The performance drop of running VREP in a VM is dramatic.
Plus the ROS plugin in VREP just connects to the ROS master, which can be exposed from VM via a VirtualBox host network.