This mod will not be used in a production environment, so please open it in Workbench for it to work.
This mod will not be used in a production environment, so please open it in Workbench for it to work.
This mod will not be used in a production environment, so please open it in Workbench for it to work.
概述 / Overview
中文:本仓库提供一个面向 Arma Reforger 的车载 LiDAR 示例 addon,演示上车自动启动扫描、按帧缓冲并导出 CSV 的完整工作流。该示例便于在工作区中启用并与 RDF(Radar Development Framework)集成进行调试与演示。
English: This repository contains a vehicle LiDAR demo addon for Arma Reforger that demonstrates automatic scanning on vehicle entry, per-frame buffered CSV export, and an easy integration with the Radar Development Framework (RDF) for debugging and demos.
许可证与仓库 / License & Repository
中文:仓库地址:https://github.com/ViVi141/Example-of-LiDAR-vehicles。项目采用 Arma Public Licence (APL),请在分发或改编时保留许可与署名信息,并遵守 APL 的非商业与 ArmaOnly 要求。
English: Repository: https://github.com/ViVi141/Example-of-LiDAR-vehicles. This project is licensed under the Arma Public Licence (APL); retain license and attribution when distributing or adapting, and follow APL's NonCommercial and ArmaOnly terms.
备注 / Notes:中文:文档中列出的配置(射线数、范围、刷新间隔、CSV 写入间隔等)均可在 RDF_VehicleLidarBootstrap.c 顶部进行调整;离线查看器支持按帧导出 PNG。
Note (EN): Configurable parameters (ray count, range, update interval, CSV flush) are at the top of RDF_VehicleLidarBootstrap.c. The viewer supports per-frame PNG export.
主要功能 / Key features
中文:上车自动扫描(进入载具时启用,退出时停用),并可配置在步行时运行以便测试。
English: Auto-scan on vehicle entry (starts on enter, stops on exit). Optionally can run on-foot for testing.
中文:矩形视场(默认 120° 水平 × 19° 垂直),通过列/行采样减少天空射线并提供规则点阵。
English: Rectangular FOV (default 120° horizontal × 19° vertical) with column/row sampling to reduce sky rays and produce regular point grids.
中文:默认参数:1024 射线(64×16),检测距离 30m,扫描频率 10 Hz,可灵活调整射线数、范围、频率等。
English: Default config: 1024 rays (64×16), 30 m range, 10 Hz scan rate. Ray count, range and frequency are configurable.
中文:CSV 缓冲导出(写入 $profile:LiDAR/lidar_live_N.csv),扩展字段包含 frameIndex、命中坐标等,便于离线重建与分析。
English: Buffered CSV export to $profile:LiDAR/lidar_live_N.csv with extended fields including frameIndex and hit coordinates for offline reconstruction and analysis.
中文:离线点云查看器(Python):支持帧回放、着色模式(hit/distance)、过滤、导出 PNG 等功能,方便可视化与媒体截取。
English: Offline point-cloud viewer (Python): supports frame playback, coloring (hit/distance), filtering, and PNG export for visualization and screenshots.
CSV 格式 / CSV Format
中文:扩展 CSV 示例字段:index,hit,time,originX,originY,originZ,dirX,dirY,dirZ,elevation,azimuth,maxRange,distance,hitPosX,hitPosY,hitPosZ,targetName,subjectVelX,subjectVelY,subjectVelZ,subjectYaw,subjectPitch,scanId,frameIndex,entityClass。
English: Example extended CSV fields include: index,hit,time,originX,originY,originZ,dirX,dirY,dirZ,elevation,azimuth,maxRange,distance,hitPosX,hitPosY,hitPosZ,targetName,subjectVelX,subjectVelY,subjectVelZ,subjectYaw,subjectPitch,scanId,frameIndex,entityClass.
中文:每行代表一条射线;可按 frameIndex 分组以重建每帧点云或做时间序列分析。
English: Each row represents a single ray; use frameIndex to group rows into frames for point-cloud reconstruction or temporal analysis.
使用方法 / Usage
中文:将 addon 加入 Workbench 工程并构建,确保 scripts/Game/Examples/SimpleVehicle/ 在编译输入中。
English: Add the addon to your Workbench project and build, ensuring scripts/Game/Examples/SimpleVehicle/ is included in the compile inputs.
中文:启动游戏并进入载具(或在控制台手动启 demo),LiDAR 会自动开始扫描并按配置导出 CSV。
English: Launch the game and enter a vehicle (or enable demo via console); LiDAR will auto-scan and export CSV per the configuration.
中文:使用点云查看器离线查看:
cd tools/lidar_viewer
pip install -r requirements.txt
python lidar_viewer.py "path/to/lidar_live_1.csv"
English: Use the point-cloud viewer to inspect data offline (see tools/lidar_viewer/README.md).
关键文件 / Key files
scripts/Game/Examples/SimpleVehicle/RDF_VehicleLidarBootstrap.c — 中文:车辆启停、扫描和 CSV 导出逻辑; English: vehicle bootstrap for scanning and CSV export.
scripts/Game/Examples/SimpleVehicle/RDF_RectangularFOVSampleStrategy.c — 中文:矩形采样策略实现; English: rectangular FOV sampling strategy implementation.
tools/lidar_viewer/lidar_viewer.py — 中文:离线点云查看器(帧浏览、播放、导出 PNG); English: offline viewer (frame browse, playback, export PNG).
Examples/SimpleVehicle/README.md 与 tools/lidar_viewer/README.md — 中文/English:示例与查看器使用说明。
依赖 / Dependencies
中文:Radar Development Framework(RDF)、Arma Reforger / Workbench、Python(查看器依赖见 tools/lidar_viewer/requirements.txt,推荐 matplotlib、numpy)。
English: Radar Development Framework (RDF), Arma Reforger / Workbench, Python (see tools/lidar_viewer/requirements.txt, recommended matplotlib, numpy).