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.
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
- Load the saved map and print point count, extent and file size.
- 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.
- Remove statistical outliers and, where your data allow, dynamic points (points seen only once or in few scans).
- Inspect in CloudCompare for double walls, floating points and holes; list defects with their likely cause (timing, extrinsics, dynamics).
- 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)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
| Symptom | Likely cause | What to check |
|---|---|---|
| Map too large | Resolution too fine or too long a flight | Increase the voxel size or split into submaps |
| Floating points | Dust, rain or moving objects | Outlier removal and range filtering |
| Double walls | Drift or timing | Go 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.