1.9K Views
August 15, 25
スライド概要
OpenCVではじめよう ディープラーニングによる画像認識、OpenCVプログラミングブックの中の人(の一人).Computer Vision/OpenCV/GPGPU/ROS/AR/インタラクティブアート/ニコニコ技術部
Tips of Livox Mid-360 with ROS 2 @dandelion1124
Self introduction ● Yasuhiro Yoshimura(@dandelion1124) ○ ○ My specialty is ■ Robotics ■ Computer Vision ■ Software Optimization atinfinity OpenCV Contributor ■ ○ dandelion1124 We published OpenCV Book ● https://gihyo.jp/book/2022/978-4-297-12775-6 I research about understanding human behavior at CyberAgent AI Lab from October 2023.
Aboud Mid-360 Mid-360 is a 3D LiDAR with the following features: ● ● ● 360° Super-Wide FOV Smaller and Lighter Active anti-interference So, Mid-360 is a 3D LiDAR with excellent cost performance. [1] https://www.livoxtech.com/en/mid-360
Capture example using Mid-360
Specifications of Mid-360[2] Name Value Detection Range 40 m @ 10% reflectivity 70 m @ 80% reflectivity FOV(deg) Horizontal: 360° Vertical: -7°~52° Frame Rate 10 Hz (typical) Blind Area < 0.1 m Data Port 100 BASE-TX Ethernet [2] https://www.livoxtech.com/mid-360/specs
Specifications of Mid-360[3] Wide vertical FOV [3] https://terra-1-g.djicdn.com/851d20f7b9f64838a34cd02351370894/Livox/Livox_Mid-360_User_Manual_EN.pdf
Specifications of Mid-360[2] Name Value IMU Built-in IMU Model: ICM40609 IP Rating IP67 width × depth × height(mm) 65 × 65 × 60 Weight 265 g Power 6.5 W (average) Power Supply Voltage Range 9 ~ 27 V DC [2] https://www.livoxtech.com/mid-360/specs
Example of connection to Computer[3] Power Supply PC and Mid-360 are connected via Ethernet [3] https://terra-1-g.djicdn.com/851d20f7b9f64838a34cd02351370894/Livox/Livox_Mid-360_User_Manual_EN.pdf
Coordinate system of Mid-360[3] The direction of the Livox logo is the positive direction of the X axis. Connector [3] https://terra-1-g.djicdn.com/851d20f7b9f64838a34cd02351370894/Livox/Livox_Mid-360_User_Manual_EN.pdf
IP address of Mid-360 ● A static IP address is set by default. ○ User can find the static IP address from the serial number attached to the device[4] The Livox Mid-360 supports only the static IP address mode. All Livox Mid-360 LiDAR sensors are set to static IP address mode by default with an IP address of 192.168.1.1XX (XX stands for the last two digits of the Livox Mid-360 LiDAR sensor’s serial number). ● User can change IP address using Livox Viewer 2 ○ https://github.com/Livox-SDK/livox_ros_driver2/issues/135 [4] https://dl.djicdn.com/downloads/Livox/Mid-360/QSG/Livox_Mid-360_Quick_Start_Guide_multi.pdf
Accessories of Mid-360 ● Livox Aviation Connector 1-to-3 Splitter Cable[5] ○ Connector for power supply and data communication ○ If you are making your own, please refer to the official datasheet and the following page. ■ ■ https://qiita.com/Nyanziba/items/0c3cf779da7fa0b3f9ae https://www.sato-susumu.com/entry/mid360_cable Power Cable [5] https://store.dji.com/en/product/livox-three-wire-aviation-connector?vid=117441 Connector (female)
Accessories of Mid-360 ● Livox AC Power Adapter[6] ○ This is an adapter for Livox Avia/Mid-70/Tele-15. ■ When using with Mid-360, it is recommended to use a conversion adapter. The jack size is 5.5mm x 2.5mm. Conversion Adapter Power Cable [6] https://store.dji.com/en/product/livox-ac-power-adapter?vid=50121 Power Cable
Power supply of Mid-360 ● USB Power Delivery (USB PD) ○ Please refer to https://zenn.dev/koide3/articles/144e97133234e2
Livox Viewer 2 ● User can get from https://www.livoxtech.com/downloads. ● This tool support Windows and Linux.
Documentation ● User can get manual from https://www.livoxtech.com/downloads. ● Please read the following document. ■ Mid-360 User Manual ■ Mid-360 Quick Start Guide ● The official Wiki URL is as follows: ○ https://livox-wiki-cn.readthedocs.io/zh-cn/latest/ ○ https://livox-wiki-en.readthedocs.io/en/latest/
Firmware Update ● User can update the firmware of the Mid-360 by using Livox Viewer 2. ● User can check the firmware update history from “Livox Mid360 Release Notes” of https://www.livoxtech.com/mid-360/downloads. ○ Be sure to check out the updates for performance improvements and bug fixes. ● Examples of firmware updates are as follows:
Buy Mid-360 ● DJI Store ○ https://store.dji.com/product/livox-mid-360?vid=130851 ● Kokyo, inc. ○ https://www.symphotony.com/lidar/livox/mid-360/ ○ https://x.com/kokyolidars
FAQ The official FAQ can be found at https://www.livoxtech.com/mid-360/faq. I introduce a few of these.
FAQ Time Synchronization Q. Which time synchronization methods are supported by Livox Mid-360? A. There are two ways to synchronize data with the Mid-360: IEEE 1588-2008 (PTP v2) and GPS. Direct sunlight Q. Can I use Livox Mid-360 in direct sunlight? A. Yes. Livox Mid-360 is unaffected by bright-light environments, while maintaining noise at a low level.
FAQ Built-in IMU Q. Is Livox Mid-360 designed with a built-in IMU? What is the model? A. Mid-360 comes with a built-in IMU, and the model is ICM40609, in which the measurement range of the accelerometer and gyroscope is ±4 g and ±2000 Deg/s respectively. Users can turn on or off the switch for pushing IMU data through Livox Viewer 2 or SDK. When the switch is enabled, Mid-360 starts to push IMU data at a frequency of 200 Hz.
FAQ Input voltage Q. Are there any requirements on the input voltage for Livox Mid-360? A. The working voltage range of Mid-360 is from 9 V to 27 V, and the Mid-360 has a working power of 6.5 W when working normally. The maximum startup power can reach 18 W (which lasts for about 8 seconds). Data bandwidth Q. What is the data bandwidth of the Livox Mid-360 point cloud? A. The maximum data bandwidth is 2.8 Mbps.
SDK ● Official SDK ○ https://github.com/Livox-SDK/Livox-SDK2 ■ Livox-SDK does not support Mid-360. ○ The official SDK has the following issues: ■ Can not build with default compiler on Ubuntu 22.04 and later. ■ The build procedure in the README is not a Release build.
SDK ● My custom SDK ○ https://github.com/atinfinity/Livox-SDK2 ○ The following changes have been made: ■ Fixed to build with default compiler on Ubuntu 22.04 and later. ■ Fixed README to build as Release build.
SDK ● Configuration ○ I introduce some frequently used settings. Parameter Detailed description xxx_xxx_ip in “host_net_info” IP address of host
SDK ● Configuration ○ I introduce some frequently used settings. Parameter Detailed description lidar_configs/ip IP address of Mid-360. If capturing multiple devices, list multiple devices.
ROS 2 driver ● Official ROS 2 driver ○ https://github.com/Livox-SDK/livox_ros_driver2 ■ livox_ros2_driver does not support Mid-360. ○ The official ROS 2 driver has the following issues: ■ It contains files for both ROS 1 and ROS 2. This makes the build steps and code complicated. ■ User can not build with “colcon build” ■ The build script deletes previous build artifacts before building. So, it takes time to rebuild. ■ The build procedure in the README is not a Release build.
ROS 2 driver ● My custom ROS 2 driver ○ https://github.com/atinfinity/livox_ros_driver2 ○ The following changes have been made: ■ Remove ROS 1 code ■ Add Jazzy support ● https://github.com/atinfinity/livox_ros_driver2/tree/jazzy ■ Changed to build with “colcon build” ■ Fixed README to build as Release build. ■ frame_id can now be set from the config file to capture multiple Mid-360.
ROS 2 driver ● Topics Topic name Message type /livox/lidar sensor_msgs/msg/PointCloud2 /livox/imu sensor_msgs/msg/Imu
ROS 2 driver ● Configuration ○ I introduce some frequently used settings. Parameter Detailed description Note publish_freq The frequency of point cloud publish. Default is 10Hz. multi_topic If the LiDAR device has an independent topic to publish pointcloud data If multi_topic=1, the IP address is added to the topic name. 0 : All LiDAR devices use the same topic to publish pointcloud data 1 : Each LiDAR device has its own topic to publish point cloud data Example: /livox/lidar_192_168_1_111 /livox/imu_192_168_1_111
ROS 2 driver ● Configuration ○ I introduce some frequently used settings. Parameter Detailed description Note xfer_format 0 : Livox pointcloud2(PointXYZRTLT) pointcloud format 1 : Livox customized pointcloud format 2 : Standard pointcloud2 (pcl :: PointXYZI) See next page frame_id frame_id of topic This parameter was added by my change.
ROS 2 driver ● Output Point Cloud format ○ PointXYZRTLT[7] See next page [7] https://github.com/Livox-SDK/livox_ros_driver2/blob/master/README.md#32-livox-ros-driver-2-internal-main-parameter-configurationinstructions
ROS 2 driver ● Output Point Cloud format ○ PointXYZRTLT ■ What is “tag”? ● Multi-echo information and noise information are stored. ● Users can use this information to filter out noise (dust, rain, etc.) ● Please refer to LiDAR Class | How to use Tag Information in Livox LiDAR Point Cloud. ● However, there are cases where this information alone is not enough to remove the image, so it is best to use spatial information as well. ● ROS2 package: autoware_livox_tag_filter
ROS 2 driver ● Output Point Cloud format ○ Livox customized pointcloud(CustomMsg.msg) See next page
ROS 2 driver ● Output Point Cloud format ○ Livox customized pointcloud(CustomPoint.msg)
ROS 2 driver ● Output Point Cloud format ○ Livox customized pointcloud ■ Community developing a package to convert from livox_ros_driver2::msg::CustomMsg to sensor_msgs::msg::PointCloud2. ● https://github.com/porizou/livox_to_pointcloud2 ● Please refer to 【ROS2】LiDARで取得したlivox独自形式データを PointCloud2形式に変換してみた - 佐藤百貨店 .
ROS 2 driver ● Output Point Cloud format ○ pcl :: PointXYZI ■ This format is defined in PCL(Point Cloud Library) ● https://pointclouds.org/documentation/structpcl_1_1_poin t_x_y_z_i.html ■ X, Y, Z, and Intensity are stored for each point.
Tips: To capture multiple Mid-360 ● 1. Check IP address of Mid-360 ○ Check the serial number on the device ○ Check via Livox Viewer 2 ○ etc… ● 2. Apply fix for frame_id bug ○ When capturing from multiple devices at the same time, there is a problem where the frame_id of the topic becomes the same. ○ Therefore, if you use the official ROS 2 driver, you must apply Livox-SDK/livox_ros_driver2#85. ○ In my custom ROS 2 driver, this fix was applied.
Tips: To capture multiple Mid-360 ● LiDAR #1 LiDAR #2 3. Custom config file ○ When capturing multiple Mid-360, I strongly recommend setting “multi_topic=1”. ■ If user set to multi_topic=0... ● Topics are published at the timing of each device. ● And, topic name and frame_id is same. /livox/lidar /livox/lidar /livox/lidar /livox/lidar /livox/lidar /livox/lidar /livox/lidar /livox/lidar
Tips: Combining multiple PointCloud2 ● ROS 2 package for combining multiple PointCloud2 ○ https://github.com/atinfinity/pointcloud_concatenate_ros2 ○ The main parameters are as follows: Parameter Detailed description clouds Number of input topic target_frame frame_id of combined pointcloud cloud_out Topic name of combined pointcloud
Tips: Combining multiple PointCloud2 ● ROS 2 package for combining multiple PointCloud2 ○ https://github.com/atinfinity/pointcloud_concatenate_ros2 ○ Left: input pointcloud ○ Right: combined pointcloud
Tips: DDS tuning 3D point cloud data require large amounts of data to be transferred. So, I recommend tuning the DDS.
Tips: DDS tuning(Cyclone DDS) ● 1. Tune system-wide network settings ○ Add the following description to /etc/sysctl.d/10-cyclonedds.conf. ○ Reboot Ubuntu OS. net.core.rmem_max=2147483647 net.core.rmem_default=2147483647 net.core.wmem_max=2147483647 net.core.wmem_default=2147483647 net.ipv4.ipfrag_time=3 net.ipv4.ipfrag_high_thresh=134217728 [8] https://autowarefoundation.github.io/autoware-documentation/main/installation/additional-settings-for-developers/network-configuration/dds-settings/
Tips: DDS tuning(Fast DDS) ● 1. Tune system-wide network settings ○ Add the following description to /etc/sysctl.d/10-fastdds.conf. ○ Reboot Ubuntu OS. net.core.rmem_max=2147483647 net.core.rmem_default=2147483647 net.core.wmem_max=2147483647 net.core.wmem_default=2147483647 net.ipv4.ipfrag_time=3 net.ipv4.ipfrag_high_thresh=134217728 [8] https://autowarefoundation.github.io/autoware-documentation/main/installation/additional-settings-for-developers/network-configuration/dds-settings/
Tips: DDS tuning(Fast DDS) ● 2. Make configuration of Fast DDS ○ Make a configuration file($HOME/fastdds.xml). ○ Please refer to DEFAULT_FASTRTPS_PROFILES.xml.
Tips: DDS tuning(Fast DDS) ● 3. Enable custom configuration ○ Add the following description to$HOME/.bashrc. export FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/fastdds.xml export RMW_FASTRTPS_USE_QOS_FROM_XML=1 ○ Please reopen terminal.
Tips: GLIM using Mid-360 ● 1. Get configuration file for Livox LiDAR ○ Please download config_versatile.tar.gz from https://koide3.github.io/glim/demo.html. ● 2. Custom configuration file for Mid-360 ○ Please change config/livox/config_ros.json for Mid-360. ■ Before ● "points_topic": "/livox/points", ■ After ● "points_topic": "/livox/lidar",
Tips: GLIM using Mid-360 ● 3. Launch GLIM ros2 run glim_ros glim_rosbag <ROSBAG2_PATH> --ros-args -p config_path:=$HOME/config/livox
Tips: “nav2_amcl” using Mid-360 ● In wide areas, the loop does not close properly in slam_toolbox, and the map may become distorted.
Tips: “nav2_amcl” using Mid-360 ● Creating an occupancy grid map from 3D point clouds obtained by GLIM ○ 3D point clouds obtained with GLIM have less distortion ○ Convert this 3D point cloud map into an occupancy grid map [6] https://github.com/atinfinity/pointcloud_to_2dmap
Acknowledgment This work was supported by JST Moonshot R&D Grant Number JPMJMS2011.
Reference ● https://proc-cpuinfo.fixstars.com/2023/01/livox-mid360-ros1-ros2/ ● https://qiita.com/porizou1/items/827d596acae993a61290 ● https://fastriver.dev/2024/12/08/mid360-teardown/ ● https://qiita.com/Nyanziba/items/0c3cf779da7fa0b3f9ae ● https://www.sato-susumu.com/entry/mid360_cable ● https://www.sato-susumu.com/entry/livox_to_pointcloud2 ● https://www.sato-susumu.com/entry/connect_mid360 ● https://zenn.dev/koide3/articles/144e97133234e2 ● https://aru47.hatenablog.com/entry/2024/10/26/222214