Skip to content

pcd点云 - #2

Merged
HouserHao merged 1 commit into
developfrom
feature/pcd
Aug 14, 2026
Merged

pcd点云#2
HouserHao merged 1 commit into
developfrom
feature/pcd

Conversation

@tianxiangLee

Copy link
Copy Markdown
Contributor

变更描述 / Description

新增 PCD 点云加载 示例(/expand/PcdViewer),在空白地图上叠加 Three.js 点云,解决示例门户无法直接打开、预览 .pcd 文件的问题。

  • 内置园区扫描点云(samples/samples.pcd),也支持导入本地 .pcd
  • 支持 ascii / binary / binary_compressed;未压缩 binary(含 intensity + rgb)用 JS 直读,避免 pcl.js 无对应点类型导致 WASM 异常
  • 着色:RGB / 高度 / 强度 / 单色;可调点大小、体素降采样、统计离群点去除
  • createPointCloud3D 增加逐点 colors,优先于 pointColor / colorMap
  • Vite 将 .pcd 纳入静态资源;依赖增加 pcl.js(体素/去噪走 WASM)

Added a PCD point cloud viewer example (/expand/PcdViewer) so the demo portal can load and inspect .pcd files on a blank map.

  • Ships a campus scan (samples/samples.pcd) and supports local .pcd import
  • Parses ascii / binary / binary_compressed; uncompressed binary with intensity + rgb is read in JS to avoid pcl.js WASM failures
  • Color modes: RGB / height / intensity / single; point size, voxel downsample, and statistical outlier removal
  • createPointCloud3D accepts per-point colors (takes priority over pointColor / colorMap)
  • Vite includes .pcd as assets; adds pcl.js for voxel/SOR filters via WASM

变更类型 / Type of Change

  • feat - 新功能 / New feature
  • fix - Bug 修复 / Bug fix
  • docs - 文档更新 / Documentation update
  • refactor - 重构(不影响功能)/ Refactor (no functional change)
  • perf - 性能优化 / Performance improvement
  • chore - 构建/依赖/配置变更 / Build / dependency / config change

关联 Issue / Related Issue

无 / N/A

测试说明 / Test Notes

  1. 打开示例门户,进入 扩展 → PCD点云加载/expand/PcdViewer

  2. 确认内置 samples.pcd 能加载,HUD 显示点数、字段、包围盒

  3. 切换着色模式(RGB / 高度 / 强度 / 单色),拖动点大小

  4. 开启体素降采样、统计离群点去除,确认渲染点数变化且画面仍可用

  5. 点击「导入 PCD 文件」,打开本地 .pcd,确认可替换当前点云

  6. 「重置视角」后相机回到默认俯仰/朝向

  7. pnpm run build 本地构建通过

  8. Open the demo portal → Expand → PCD Point Cloud (/expand/PcdViewer)

  9. Confirm the built-in samples.pcd loads and HUD shows count / fields / bounds

  10. Switch color modes (RGB / height / intensity / single) and adjust point size

  11. Enable voxel downsample and SOR; rendered count should change without breaking the view

  12. Import a local .pcd and confirm it replaces the current cloud

  13. “Reset view” restores the default camera

  14. pnpm run build succeeds locally

Checklist

  • 本地构建通过 pnpm run build / Local build passes
  • 代码符合项目规范 / Code follows project conventions
  • 已更新相关文档(如有必要)/ Updated relevant docs (if needed)

@HouserHao
HouserHao merged commit 207d432 into develop Aug 14, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants