Livox_gz_sim: Livox Mid-360 and HAP simulation for Gazebo Harmonic

Hi all,

I’ve released livox_gz_sim, a Gazebo Harmonic plugin that simulates Livox Mid-360 and HAP lidars and publishes exactly what livox_ros_driver2 publishes. As far as I know it’s the first gpu agnostic Livox simulator for Gazebo Harmonic; the existing ones target Gazebo Classic or require CUDA.

What it does

  • Uses Livox’s recorded non-repetitive scan patterns, so coverage builds up over frames like on the real sensor
  • Publishes livox_ros_driver2/CustomMsg or PointCloud2 in the driver’s 26-byte layout (xfer_format 0/1), with per-point timestamps
  • Simulates the Mid-360’s IMU at 200 Hz
  • Adds range and angle noise from the datasheet, and reflectivity (0–255) from <laser_retro>
  • Supports multiple sensors, configurable publish rate and downsampling, and world resets

Because the output matches the driver, stacks like FAST-LIO run on it unchanged.

lidar

Repo: GitHub - mathaimp/livox_gz_sim: ROS2 Livox Lidar Simulation · GitHub

Requires livox_ros_driver2 for the message types only, plus an OpenGL-capable GPU.

Feedback, issues, and requests for other Livox models are welcome.

2 Likes

Thanks for sharing! This is really nice and offers the possibility to simulate even without a raytracing-capable GPU. Of course at the price of rendering speed and depth artifacts connected to the gpu_lidar system.

What does a recorded pattern mean? Is that a few seconds/minutes you have recorded on your sensors? Or is there some “official” recorded pattern published somewhere?

Thanks! To clarify, the recorded patterns are the official recorded Livox scans from GitHub - Livox-SDK/livox_laser_simulation: A package to provide plug-in for Livox Series LiDAR. · GitHub . I have compared this to scans from a real world mid360, and they seem consistent.

As an aside, the goal was to simulate the Livox lidars as true to life as possible on an arbitrary GPU, which is relatively lightweight, but comes with the flaws of the gpu_lidar. If you really need as close a match to the real lidar as possible, and you have a CUDA enabled GPU I suggest using GitHub - RobotecAI/RobotecGPULidar · GitHub .

Great work! Would you be interested in adding your project to Projects using Gazebo — Gazebo jetty documentation?