Skip to the content
FixTheRobot Explore Robotics / UAV / Module 4 / M4-L3

UAV Systems Engineering · M4-L3 · Hands-on lab (runs on your machine)

Build a 3D point-cloud map

Turn the odometry from the previous lab into a usable map and check its size and quality.

  • SLAM and Autonomous Localization
  • Research-level
  • About 90 minutes

What you will do

Starting from the trajectory and scans of the FAST-LIO2 lab, you will produce a clean, bounded map suitable for localisation (lesson M4-T13) and for planning.

Before you start

  • Output of the lab “Run FAST-LIO2 on a dataset” (registered scans or the saved PCD map).
  • Open3D or PCL and CloudCompare for inspection; the voxel filter of lesson M4-T6.

Steps

  1. Load the saved map and print point count, extent and file size.
  2. Voxel-filter at 0.1, 0.2 and 0.5 m and record the point count and file size for each; choose the resolution that meets a map-size budget you define (for example 50 MB) and the accuracy your mission needs.
  3. Remove statistical outliers and, where your data allow, dynamic points (points seen only once or in few scans).
  4. Inspect in CloudCompare for double walls, floating points and holes; list defects with their likely cause (timing, extrinsics, dynamics).
  5. Save the final map with a text record of the sensor, software versions, configuration and voxel size, ready to be versioned (lesson M7-T19).
# with Open3D (pip install open3d); API as in the Open3D documentation for your version
import open3d as o3d
pcd = o3d.io.read_point_cloud("map.pcd"); print(pcd)
for v in (0.1, 0.2, 0.5):
    d = pcd.voxel_down_sample(voxel_size=v); print(v, len(d.points))
clean, idx = d.remove_statistical_outlier(nb_neighbors=20, std_ratio=2.0)
o3d.io.write_point_cloud("map_clean.pcd", clean)
Typical Open3D workflow; adapt to your file.

How to know it worked

  • A table of voxel size against point count and file size.
  • A cleaned map within your size budget with a defect list.
  • A configuration record stored with the map.

If it does not work

Troubleshooting
SymptomLikely causeWhat to check
Map too largeResolution too fine or too long a flightIncrease the voxel size or split into submaps
Floating pointsDust, rain or moving objectsOutlier removal and range filtering
Double wallsDrift or timingGo back to the odometry lab and check extrinsics and time offset

References

Record your progress

Saved in this browser. This lab runs on your own machine, so the site cannot check it for you.