-
Notifications
You must be signed in to change notification settings - Fork 0
Running Velodyne Lidars (VLP16)
Refer to the following notes for general instructions for running VLP16 Velodyne lidars.
- How to config network:
- Do not plug into a router or switch, as it will result in network disruptions
- Plug in directly to computer
- Manually set your ethernet port to an IP:
-
sudo ifconfig enp2s0 192.168.1.100
- Create a route to lidar’s IP:
-
sudo route add 192.168.1.201 enp2s0
The above actions must be performed every time the connected computer or network is restarted; as well as in the case that the Velodyne itself is unplugged or restarted. NOTE: Ubuntu's network manager will sometimes try to reconnect randomly and will mess up the configuration. To avoid this, you can turn off the network manager once the lidars are connected by running: sudo service network-manager stop
- To configure two lidars simultaneously, scripts have been made that can do this automatically
- See: https://github.com/BEAMRobotics/ig_collect_scans/blob/36c998807ddc5519084b1fc22dcea9595ea539d1/scripts/config_eth_ig.sh
- note that you need to input the proper name of each ethernet port into this shell script first using ifconfig and check where each lidar is plugged into. This will differ with each computer.
- Convert calibration file into .yaml format:
- Execute in order to be able to run any ros code:
roscore
rosrun velodyne_pointcloud gen_calibration.py /path/to/Velodyne/VLP16_High_Res/VeloView-VLP-16-HiRes.xml
- Run:
roslaunch velodyne_pointcloud VLP16_points.launch calibration:=/path/to/velodyne/velodyne_pointcloud/params/VLP-16-Lite.yaml
- Run:
rviz with topic: /velodyne_points and fixed frame velodyne
- Start roscore inorder to execute ros files
roscore
- Execute the following command to start running VLP 16 Puck
-
roslaunch velodyne_pointcloud VLP16_points.launch
- If you have a roslaunch error or roscore error that means that you need to execute the following command
source devel/setup.bash
- If you have a roslaunch error or roscore error that means that you need to execute the following command
-
- To view the data being read by the lidar using RVIZ, which is launched using the following command
rosrun rviz rviz
The above command will open an application window. On the far right you will see a label called "Fixed Frame". Click it and go down to the bottom left and click on the "Add" button. This will open up a new window. Go to the second tab labeled "By Topic". Scroll down and you will see an option labeled "Point Cloud". Select it and it will open up a new option on the left bar of the main RVIZ application, but it will be red. To fix this problem, go back to the Fixed Frame option and change its name to "velodyne". You should now see the lidar data on the RVIZ application.
-
Launch the lidar using the commands shown in the previous section
-
Create a directory to story the bag data and enter the directory
mkdir -p ~/bagfiles && cd ~/bagfiles
-
The important lidar data is stored in the velodyne topiclabeled /velodyne_points. To record this data into a rosbag for later analysis use the following command to store the relevent data into file_name.bag
rosbag record -O file_name.bag /velodyne_points
-
Record as long as you want and then exit the recording by using Ctrl + C.
- Make sure roscore is running or the following commands will not work.
- Open RVIZ using the commands discussed above
- Click on Fixed Frame and the 'Add" button on the bottom left of the screen. On the first tab scrop down and click on 'Point Cloud 2'
- In Point Cloud tab, change the topic to '/velodyne_points'
- Change the fixed frame name to 'velodyne'
- In a blank terminal enter the following commands
cd ~/bagfiles
rosbag play --clock filename.bag
- When running two Velodynes, each lidar requires a different IP address and port number. The following configuration is feasible combination:
- Vertical Lidar:
- 192.168.1.201
- Port 2368
- Horizontal Lidar:
- 192.168.1.202
- Port 2369
- Ensure that the port number is set correctly in the launch file as well as on the web server of the lidar (enter IP address of Lidar into the browser when you are connected to the sensor to view web server settings)
Author: Nick Charron and John Hateley
Last Edited: 08 Aug 2022
- Home
- Onboarding
- Installation Guide
- Libbeam
- Mapping
- Calibration
- Hardware Instructions
- Deep Learning
- Formatting
- PoTree Maps
- Supported Hardware
- Additional Resources