Search code examples
macosubunturosnetwork-protocolslidar

how to display velodyne points on ROS installed on "Ubuntu on Mac" via Parallels Desktop on macOS?


This is probably easy but I am a noob in networks so please help! Basically I am trying to display lidar points from my Velodyne VLP-16 on ROS installed on Ubuntu 18.04 which is in turn installed via Parallels Desktop on my macOS.

So I plugged the velodyne's ethernet cable to my MacBook via a usb-C-to-ethernet adapter and set this on my mac: enter image description here

I can type in my browser this address 192.168.1.201 and I can see the velodyne interface. So it works.

When I now go to "Ubuntu on Mac" via Parallels Desktop and do not change anything in Network->Settings->Wired->Connected so I can see these settings: enter image description here

... I can still see the velodyne interface via a browser on Ubuntu by typing the 192.168.1.201 address as I can on macOS. The only problem is that when I wanna run

roslaunch velodyne_pointcloud VLP16_points.launch

it says that:

[ INFO] [1592867527.026682801]: Opening UDP socket: port 2368
[ WARN] [1592867528.028658170]: Velodyne poll() timeout
[ERROR] [1592867528.029191798]: DriverNodelet::devicePoll - Failed to poll device.

so it does not work.

I have tried to look up something similar but I failed cos my knowledge in networks is very limited. Following this tutorial I could not get this command through cos it says:

maciej@ubuntu:~$ sudo ifconfig eth0 192.168.3.100
[sudo] password for maciej: 
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device

Interestingly, when I change the IP address on "Ubuntu on Mac" to this: enter image description here I cannot see the Velodyne interface in my browser on Ubuntu, but I still can on my macOS.

I will just add that when I follow the mentioned tutorial on Ubuntu installed on a PC (not via Parallels Desktop on mac), everything works. Please help bosses!


Solution

  • After a thorough examination of the network traffic both on macOS and on the emulated Ubuntu using Wireshark on both ends, I realised that there is no Network adapter present in the virtual machine configuration.

    Following the answer from Desktop Parallel support, I did: Ubuntu on Mac -> configure -> hardware -> add device -> network 2 -> source: USB...

    and when you check now in Wireshark, you will see the traffic coming from the USB adapter and the ROS driver, via an adequate port, will capture the packets.