Cosys-AirSim icon indicating copy to clipboard operation
Cosys-AirSim copied to clipboard

Wrong Lidar Point Cloud

Open DanieleMarchisotti opened this issue 10 months ago • 2 comments

I have a problem with Lidar point cloud. I am getting Lidar data with the following setting in the settings.json:

          "LidarSensor1": { 
            "SensorType": 6,
            "Enabled": true,
            "External": false,
            "ExternalLocal": true,
            "NumberOfChannels": 32,
            "Range": 120,
            "RotationsPerSecond": 10,
            "MeasurementsPerCycle": 1024,
            "X": 0,
            "Y": 0,
            "Z": -0.55,
            "Roll": 0,
            "Pitch": 0,
            "Yaw": 0,
            "VerticalFOVUpper": 26.8,
            "VerticalFOVLower": -24.8,
            "HorizontalFOVStart": 0,
            "HorizontalFOVEnd": 360,
            "DrawDebugPoints": false,
            "IgnoreMarked": true,
            "GenerateNoise": true,
            "DrawSensor": false
          }

I am also pausing the simulation while acquiring Lidar data client_sim.call('simPause', True). However I get a point cloud with several gaps as in the following image. There is a difference between the gaps in terms of altitude (Z) because my drone is moving upwards and the difference between the highest and the lowest gap is of 2.7m with a drone speed of 5 m/s. Since I have set "RotationsPerSecond": 10 I should not have those gaps. Do you know what could be the problem?

Image

I also have a difference in terms of height (always because the drone is moving upwards) between the Lidar point cloud and the point cloud obtained from depth

Image

DanieleMarchisotti avatar Mar 21 '25 17:03 DanieleMarchisotti

@DanieleMarchisotti I am seeing the same issue, any updates on this? Could it be due to this and/or this answer?

ssaigarimella avatar Apr 02 '25 18:04 ssaigarimella

@ssaigarimella The first answer you sent seems not really related since I have set RotationsPerSecond: 10 with a drone speed of 5 m/s and the gap is of 2.7m in the point cloud so too high.

The second answer seems to be the cause since if "AirSim LiDAR sensor (using CPU collisions) applies the same principle of only calculating the points based on the time delta that has passed between consecutive frames", then if I am saving LiDAR sensor data in a very long time, the point cloud have this effect. Indeed this problem seems to be mitigated once I started saving depth at a higher speed after solving this issue #76, but in that case, RotationsPerSecond: 10 does not have effect. So still not completely clear to me.

DanieleMarchisotti avatar Apr 13 '25 07:04 DanieleMarchisotti