Commit f777efe
Gpu lidar 360 scan (#160)
* Fix nng build with UE5 toolchain and replace deprecated pkg_resources
Pass UE5 sysroot and find-root-path-mode args to nng's ExternalProject_Add
to match how assimp is already configured, fixing undefined symbol errors
(arc4random, strlcpy, __isoc23_strtoull) when linking against UE5's
packaged toolchain. Replace deprecated pkg_resources with importlib.resources
in the Python client for Python 3.12+ compatibility.
* Add GPU lidar example and fix UE 5.7 render pass
- Example script lidar_basic_gpu.py plus scene + robot configs that
exercise the UGPULidar path via lidar-type: gpu_cylindrical.
- Drop redundant VS/PS SetParameters in the UE 5.7 branch of the
lidar intensity scene view extension. They dirtied scratch params
before SetShaderParameters could commit, tripping the 5.7
!HasParameters() ensure. The View UB is still bound through the
shader parameter struct.
- Throttled [GPULidar DEBUG] logs across Simulate, TickComponent,
and PrePostProcessPass_RT for pipeline diagnosis.
* chmod +x blocks_genprojfiles_vscode.sh
* Fix GPU lidar point cloud generation and visualization
Root cause was a stride mismatch on the readback path: UE5's FVector4
is TVector4<double> (32 bytes), but the compute shader writes 16 bytes
per point, so the memcpy silently shifted data across rows. Switching
the receiving buffer to FVector4f restores alignment.
Other fixes layered on top:
- Rebuild Cam1ProjData from the live scene-capture transform every
tick (init-time capture happens before the component is parented,
collapsing the inverse view-projection to near-identity).
- Compute and bind a forward ProjectionMatrix from a fresh
FSceneViewProjectionData with axis-swap rotation, transposed for
HLSL column-major mul.
- Restructure the compute kernel to unconditionally write all four
components per thread (sentinel xyz=-1 for misses, w=intensity).
- Remove the VS/PS->SetParameters(GetScratchShaderParameters()) calls
in the UE 5.7 path that dirtied scratch and tripped the
!HasParameters() ensure inside SetShaderParameters.
- Visualization: pass color_mode=COLOR_INTENSITY in lidar_basic_gpu.py
(segmentation_cloud is filled with -1, which renders black on
black). Configure symmetric +/-15 deg vertical FOV to work around
the upper*2 / hardcoded-symmetric VFOV bugs in GPULidar.cpp and
the shader.
* Bisect GPU lidar fix down to minimal set vs main
Revert the speculative pieces layered on top of the FVector4f stride fix,
keeping only the changes that are demonstrably needed:
- GPULidar.cpp: revert per-tick Cam1ProjData rebuild (back to main).
- LidarPointCloudCS.usf: revert kernel restructure (back to main's
conditional indexed writes).
- LidarPointCloudCS.h: restore dead SHADER_PARAMETER_UAV comment.
- LidarIntensitySceneViewExtension.cpp: revert UnrealLogger include,
readback-bool refactor, and the AddClearUAVFloatPass removal — but
keep the SetParameters fix and the FwdProjData → ProjectionMatrix
block (the latter is needed for the shader's ProjectWorldToScreen).
Net delta vs main is now: FVector4f data type, UE 5.7 SetParameters
fix, and forward ProjectionMatrix wiring.
* Restore trailing whitespace on blank line in lidar readback block
Drops an incidental whitespace-only delta vs main so the file diff
shows only the intentional SetParameters and ProjectionMatrix changes.
* enabled 360 GPU lidar
* LiDAR type detection test
* modified mid70 settings
---------
Co-authored-by: MarinaGloc <95144231+MarinaGloc@users.noreply.github.com>
Co-authored-by: MarinaGloc <tu-correo-de-github@example.com>1 parent fd2d265 commit f777efe
20 files changed
Lines changed: 2581 additions & 32 deletions
File tree
- client/python
- example_user_scripts
- sim_config
- projectairsim/tests
- sim_config
- unreal/Blocks
- Plugins/ProjectAirSim/Source/ProjectAirSim/Private
- Sensors
- Shaders
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
0 commit comments