Troubleshooting · Sensors
LiDAR point cloud is distorted
A spinning LiDAR takes a full sweep over time. If the robot moves during the sweep and the cloud is not corrected, the world is smeared.
1. Symptoms
- Straight walls look curved while turning.
- Walls appear doubled where the scan starts and ends.
- The distortion grows with speed and turning rate and disappears when still.
2. Possible causes
- Motion during the sweep not corrected (no deskew).
- Wrong or missing per-point timestamps, so deskew cannot work.
- Time offset between the LiDAR and the IMU or odometry used to correct it.
- Wrong extrinsics between LiDAR and base frame.
- Wrong scan frame or rate settings in the driver.
3. Measurements to collect
- Sweep period (for example 0.1 s at 10 Hz) and robot speed and turn rate.
- Whether the points carry per-point time and the field that holds it.
- Time offset between LiDAR and IMU (see the offsets-from-bags guide).
- A static target scan taken while still and while turning.
4. Diagnostic commands
Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).
ros2 topic echo /points --once --field fields
ros2 topic hz /points
ros2 bag record /points /imu/data /odom5. Step-by-step investigation
- Confirm the effect is motion-related: still scans are clean; turning scans are not.
- Estimate the size: distortion ≈ speed × sweep period (a 1 m/s robot moves 0.1 m in a 10 Hz sweep).
- Check the per-point time field in the PointCloud2 fields.
- Check the time offset with the bag-offset method.
- Enable deskew in the driver or the SLAM front-end with IMU or odometry.
- Verify the extrinsics with a flat wall.
6. Corrective actions
- Use a driver and estimator that apply per-point timestamps and deskew with high-rate IMU or odometry.
- Correct the LiDAR–IMU time offset.
- Re-calibrate extrinsics.
- Reduce speed while turning if deskewing is unavailable.
- Use a faster sweep rate if the sensor allows.
7. Validation after the fix
- A wall stays straight within the requirement at the maximum turn rate.
- Residual after deskew is below the mapping tolerance.
- The correction holds after a restart.
References
- PointCloud2 and LaserScan messages: sensor_msgs (jazzy).
- Related: LiDAR guide and the timing guides.
- Related guide: offsets and latency guide.