Article directory
This article introduces how to install the ROS1/2 driver of DJI Livox MID-360/HAP in Ubuntu20.04
1. Wiring connection
livox MID-360 aviation plug-in one-point three-wire, the aircraft carrier head is connected to the laser radar, and the network cable is connected to the PC. The power supply requires DC 9~27 V, 12 V is recommended, pay attention to the positive and negative poles
HAP (9-18V) is the same.
2. Install the host computer visualization tool
Go to the official websitehttps://www.livoxtech.com/cn/mid-360/downloadsDownload the host computer software Livox Viewer 2 - Ubuntu
unzip "LivoxViewer2 for Ubuntu v2.3.0.zip"
cd "LivoxViewer2 for Ubuntu v2.3.0"
chmod +x LivoxViewer2.sh
./LivoxViewer2.sh
3. Install ROS driver
3.1 Configure static IP
The host configuration static IP is 192.168.1.50
3.2 Install Livox SDK2
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd Livox-SDK2/
mkdir build && cd build
cmake ..
make -j
sudo make install
To check whether the installation is successful, you need to modify Livox-SDK2/samples/livox_lidar_quick_start/mid360_config.json:
"host_ip" : "192.168.1.50",
Run the following to install successfully:
cd Livox-SDK2/build/samples/livox_lidar_quick_start
./livox_lidar_quick_start ../../../samples/livox_lidar_quick_start/mid360_config.json
The same applies to HAP, modify Livox-SDK2/samples/livox_lidar_quick_start/hap_config.json:
"host_ip" : "192.168.1.50",
run:
cd Livox-SDK2/build/samples/livox_lidar_quick_start
./livox_lidar_quick_start ../../../samples/livox_lidar_quick_start/hap_config.json
3.3 Install ROS driver
cd ~
git clone https://github.com/Livox-SDK/livox_ros_driver2.git ws_livox/src/livox_ros_driver2
cd ws_livox/src/livox_ros_driver2
# For ros1
./build.sh ROS1
# For ros2
./build.sh ROS2
3.4 MID-360 driver
Modify the host IP cmd_data_ip and radar IP in ws_livox/src/livox_ros_driver2/config/MID360_config.json, where the radar IP is 192.168.1.1XX, and the last two digits are the last two digits of the radar S/N code (can be found on the radar packaging box and under the radar) two persons
"cmd_data_ip" : "192.168.1.50",
"ip" : "192.168.1.140",
start up
cd ws_livox
source install/setup.sh
ros2 launch livox_ros_driver2 rviz_MID360_launch.py
If you encounter a similar error:what(): Could not load library dlopen error: liblivox_lidar_sdk_shared.so: cannot open shared object file: No such file or directory, at /tmp/binarydeb/ros-galactic-rcutils-4.0.4/src/shared_library.c:99
, it means that the Livox SDK2 library is missing and is installed but unavailable because it is not in the LD_LIBRARY_PATH environment variable. So add the /usr/local/lib directory to the variable .bashrc:
sudo gedit ~/.bashrc
# 添加:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
ROS1 driver
cd ws_livox
source devel/setup.sh
roslaunch livox_ros_driver2 rviz_MID360.launch
3.5 HAP driver
Modify the host IP cmd_data_ip and radar IP in ws_livox/src/livox_ros_driver2/config/MID360_config.json. The radar IP 192.168.1.100 is the HAP factory default static IP:
"cmd_data_ip" : "192.168.1.50",
"ip" : "192.168.1.100",
start up
cd ws_livox
source install/setup.sh
ros2 launch livox_ros_driver2 rviz_HAP.launch.py