Environment
- OS: Ubuntu 22.04
- GPU: NVIDIA RTX 3070 Ti
- AWSIM: v2.0.1 (
AutowareSimulationDemo)
- Unity: 6000.0.34f1
- Bundled RGL: 0.18 (
libRobotecGPULidar.so in AWSIM v2.0.1)
- Reproduced on both the official Demo player and a local rebuild from the v2.0.1 source
- Same PC: AWSIM Labs v1.6.1 (RGL 0.17) publishes a non-empty cloud
Also confirmed:
- ROS 2 was not sourced in the AWSIM process (
ROS_DISTRO unset). The "do not source ROS 2 in RobotecGPULidar standalone build" warning is a separate issue and was not the cause here.
- RGL scene registration succeeded (~1400 objects).
- LiDAR topics exist at ~10 Hz (
/sensing/lidar/top/pointcloud_raw, ..._ex).
Problem
In AutowareSimulationDemo, LiDAR topics publish at ~10 Hz, but the cloud is empty (points = 0).
The Unity Game view also shows no points, so Autoware localization has no usable scan.
Cause
Raytracing itself is fine. Hits are discarded by the compact node.
| Stage |
Point count |
| Rays |
28800 |
Hits before compact (IS_HIT = 1) |
~27080 / 28800 (~94%) |
After compact_by_field(IS_HIT_I32) |
0 |
v2.0.1 connects the graph as:
RGLNodeSequence.Connect(rglGraphLidar, rglSubgraphCompact);
RGLNodeSequence.Connect(rglSubgraphCompact, rglSubgraphToLidarFrame);
rglSubgraphCompact is AddNodePointsCompactByField(..., RGLField.IS_HIT_I32).
A standalone test of the same .so could produce hits. The failure appears in the AWSIM LiDAR graph + RGL 0.18 compact_by_field. Labs on this PC uses RGL 0.17 (AddNodePointsCompact) and does not hit this bug.
Materializing IS_HIT with a Format node before compact did not fix it. This looks like an RGL 0.18 compact bug (or a field-layout mismatch), not a missing mesh / CUDA / ROS setup problem.
Workaround (not a proper fix)
Skip the compact node and publish the raw cloud.
In Assets/RGLUnityPlugin/Scripts/LidarSensor.cs Awake():
// official v2.0.1
// RGLNodeSequence.Connect(rglGraphLidar, rglSubgraphCompact);
// RGLNodeSequence.Connect(rglSubgraphCompact, rglSubgraphToLidarFrame);
// workaround
RGLNodeSequence.Connect(rglGraphLidar, rglSubgraphToLidarFrame);
Also always connect ConnectToWorldFrame() to rglGraphLidar (not rglSubgraphCompact).
After this:
- AWSIM Game view shows the cloud
/sensing/lidar/top/pointcloud_raw has 28800 points
- Autoware NDT can consume the scan
Side effects:
- Miss rays remain (~6%). They often become NaN / non-hits in the ROS cloud.
- Autoware
crop_box may warn about NaNs.
- Visualization can still drop misses in C# by reading
IS_HIT, but the ROS topic still includes them.
A proper fix would be in RGL 0.18 compact_by_field(IS_HIT), or AWSIM switching compact back on after that is fixed (or filtering misses without that node).
How to reproduce
- Ubuntu 22.04 + NVIDIA RTX GPU
- Run official AWSIM v2.0.1 Demo without sourcing ROS 2
- Load
AutowareSimulationDemo (Shinjuku)
ros2 topic hz /sensing/lidar/top/pointcloud_raw → ~10 Hz
- Inspect PointCloud2 size → 0 points
- Uncompacted yield of the same graph still shows ~27000 hits
Environment
AutowareSimulationDemo)libRobotecGPULidar.soin AWSIM v2.0.1)Also confirmed:
ROS_DISTROunset). The "do not source ROS 2 in RobotecGPULidar standalone build" warning is a separate issue and was not the cause here./sensing/lidar/top/pointcloud_raw,..._ex).Problem
In
AutowareSimulationDemo, LiDAR topics publish at ~10 Hz, but the cloud is empty (points = 0).The Unity Game view also shows no points, so Autoware localization has no usable scan.
Cause
Raytracing itself is fine. Hits are discarded by the compact node.
IS_HIT = 1)compact_by_field(IS_HIT_I32)v2.0.1 connects the graph as:
rglSubgraphCompactisAddNodePointsCompactByField(..., RGLField.IS_HIT_I32).A standalone test of the same
.socould produce hits. The failure appears in the AWSIM LiDAR graph + RGL 0.18compact_by_field. Labs on this PC uses RGL 0.17 (AddNodePointsCompact) and does not hit this bug.Materializing
IS_HITwith a Format node before compact did not fix it. This looks like an RGL 0.18 compact bug (or a field-layout mismatch), not a missing mesh / CUDA / ROS setup problem.Workaround (not a proper fix)
Skip the compact node and publish the raw cloud.
In
Assets/RGLUnityPlugin/Scripts/LidarSensor.csAwake():Also always connect
ConnectToWorldFrame()torglGraphLidar(notrglSubgraphCompact).After this:
/sensing/lidar/top/pointcloud_rawhas 28800 pointsSide effects:
crop_boxmay warn about NaNs.IS_HIT, but the ROS topic still includes them.A proper fix would be in RGL 0.18
compact_by_field(IS_HIT), or AWSIM switching compact back on after that is fixed (or filtering misses without that node).How to reproduce
AutowareSimulationDemo(Shinjuku)ros2 topic hz /sensing/lidar/top/pointcloud_raw→ ~10 Hz