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

problem at function simSetSegmentationObjectID #3103

Open
lucafei opened this issue Oct 27, 2020 · 4 comments
Open

problem at function simSetSegmentationObjectID #3103

lucafei opened this issue Oct 27, 2020 · 4 comments

Comments

@lucafei
Copy link

lucafei commented Oct 27, 2020

hello, guys, i'm using API simSetSegmentationObjectID to change the color of segmentation. But i find when i used simSetSegmentationObjectID to assign a specific value to a specific mesh, it actually changed the value of mesh. like following:
success = client.simSetSegmentationObjectID('runway[\w]*',19,True)
i can clearly see the color is already changed.
after i save the segmentation image. i open this image and read the pixel value. But i find it is not same with the rgb, which maps to value 19: you can find the RGB values for each object ID in this file https://microsoft.github.io/AirSim/seg_rgbs.txt. In my case i read the RGB value of saved segmentation image as [0,126,138] , but i set the value as 19 which maps to RGB value as [0, 53, 65]. It makes me very confused. Do you guys help me and give me some tipps? Thank you in advance.

@rajat2004
Copy link
Contributor

Are you using a release binary or the latest master? There's a PR #2845 in master currently which fixes color corrections and makes the ids match with the values

@lucafei
Copy link
Author

lucafei commented Oct 31, 2020

Are you using a release binary or the latest master? There's a PR #2845 in master currently which fixes color corrections and makes the ids match with the values

yes, i have built the latest version of airsim from master. And the simSetSegmentationObjectID and simGetSegmentationObjectID works. But when i read the segmentation image using PIL and get the RGB value. I found it is different from what i used SetSegmentationObjectID to set. So i don't know where is the problem? maybe the file https://microsoft.github.io/AirSim/seg_rgbs.txt is updated? because the RGB value derived from this file is always different from the final saved RGB value.

@chickenbestlover
Copy link

Hello, the problem happened to me as well. Did you find any solutions to this?

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants