Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simGetLidarSegmentation() do not match getLidarData().point_cloud #2409

Closed
xiaoaoran opened this issue Feb 7, 2020 · 2 comments
Closed

simGetLidarSegmentation() do not match getLidarData().point_cloud #2409

xiaoaoran opened this issue Feb 7, 2020 · 2 comments

Comments

@xiaoaoran
Copy link

xiaoaoran commented Feb 7, 2020

I tried to get segmentation ground truth via client.simGetLidarSegmentation():

lidarData = self.client.getLidarData()
lidarSeg = self.client.simGetLidarSegmentation()

print(len(lidarData.point_cloud))
>>>3858
print(len(lidarSeg))
>>>1336
So the number of lidar point in lidarData should be 3858/3=1286, which is not equal to the number of ground truth points in lidarSeg

but @ironclownfish said

api function: simGetLidarSegmentation().
Returns the segmentation of each lidar point's collided object in the last lidar update. i.e. the segmentation IDs align with getLidarData().point_cloud
https://github.com/microsoft/AirSim/pull/2011#issue-286773742

Anyone could tell me why? Thanks!

@xiaoaoran xiaoaoran changed the title How to use simGetLidarSegmentation() do not match getLidarData().point_cloud Feb 7, 2020
@TheFloe1995
Copy link

I also stumbled across this issue. It seems that you have to call both functions right after each other.

In a quick experiment I called both functions directly after each other at 10 FPS while moving. Most of the time the number of points was equal in both lists. But in 7/300 cases they were different.

Seems to be timing dependent which is quite inconvenient in my opinion. Are there any plans to change that behaviour, e.g. having a single function call to get the point cloud + segmentation IDs?

@rajat2004
Copy link
Contributor

I've opened #2810 which combines segmentation data into LidarData struct fetched using getLidarData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants