Repository navigation
Cast each LiDAR tick's rays in one parallel batch - #170
Merged
Merged
Conversation
The LiDAR ran a ParallelFor per horizontal angle with one ray per channel, so a 16-channel LiDAR at 10 Hz issued hundreds of tiny batches per second and the calling thread spent most of its time handing out and waiting for work. The rays of consecutive angles now go in one batch, shot before a completed sweep is published, so the points are the same. - The range noise generator was shared by the parallel rays (a data race); noise samples are drawn before each batch. - The debug-point index used the 1-based step and wrote one row past the end of point_cloud_draw_ when DrawDebugPoints was on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmWqXFCY6vDdpRe4VHoaQX
jcfurey
marked this pull request as ready for review
October 4, 2026 05:46
Contributor
|
Thank you for the nice improvements in these pull requests! Much appreciated! |
Contributor
Author
|
Happy to help! Thanks for the merges! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LiDAR ran a
ParallelForper horizontal angle with one ray per channel, so most of its time went into dispatching and waiting for tiny batches. The rays of consecutive angles now go in one batch, shot before a finished sweep is published, so the points are the same.Also fixes two bugs in that code:
DrawDebugPoints, the debug-point index wrote one row past the end of its array.In HERCULES (a Cosys-AirSim fork, UE 5.8.3), four 16-channel LiDARs went from ~25 ms to ~6 ms of game-thread time per frame in a dense scene. Also built from this tree with UE 5.8.3 (Windows): in Blocks, a 16-channel LiDAR with noise returns full 5,760-point sweeps.
🤖 Generated with Claude Code