Velodyne LiDAR VLP-16


We try to connect lidar to px2, and run sample code ./lidar_replay on driveworks-0.6.
There are two Ethernet cables one for connecting Internet(cable1), another is for lidar(cable2).

At the beginning we insert cable2 on px2 and power on px2 and lidar, and we can’t execute ./lidar_replay.

We insert cable1 on px2 and power on .When we confirm that cable1 is working, change to cable2.
We run ./lidar_replay successfully.

Always need to confirm cable1 working fine first. We have checked it many time.

We use the following command to confirm that the Ethernet is working properly.

$ sudo tcpdump -i eh0

Command for sample code:

$ sudo ./sample_lidar_replay --protocol=lidar.socket --params=device=VELO_VLP16,ip=,port=2368,scan-frequency=12,protocol=udp

Hi, were you able to find a way to do this without connecting to the internet first? I have the same scenario, but I want to know if I can connect to the Velodyne without connecting the px2 to the internet.

I was able to figure this out.

First, you need to change the Host(Destination) IP address in the velodyne configuration to a 192.168.1.XX , where XX is any number (different than the lidar’s own IP address).

Next, you need to go into the network settings of the Drive PX2, by going to “/etc/systemd/network/”. Next remove eth0 information from the existing network file (this is the [match] info and the DCHP info corresponding to eth0). Then create a new file, I called it In here, enter the following:



This keeps the Gateway consistent with the Lidar gateway. Now you have to restart your network settings by typing: “sudo systemctl restart systemd-networkd”

Then you can check to make sure its sending from lidar IP address and port, to px2 ip address and port by entering the command: “sudo tcpdump -i eth0”.

Now the sample_lidar_replay should be working with the following command:
“sudo ./sample_lidar_replay --protocol=lidar.socket --params=device=VELO_VLP16,ip=,port=2368,scan-frequency=10,protocol=udp”