When I request the segmentation object ID, it always returns -1. Even if I had requested
client.simSetSegmentationObjectID('object_name',1) (which does return True and does change the color of the segmentation mask) beforehand.
I am running AirSim in CV-mode.
Is anyone else also encountering this problem?
Yes, I am. Airsim latest commit. Windows 10. Custom Unreal environment.
For instance,
found = client.simSetSegmentationObjectID("FbxScene_GraveCart[\w]*", 22, True);
correctly changes all the carts colors to 22. (verified by extracted image)
But
print(client.simGetSegmentationObjectID("FbxScene_GraveCart4"))
returns -1
-1 is returned when said object is not found. Note that UE requires you to manually name the object (i.e. XYZ_4 is auto-generated and may not be valid in next run).
If this is still a problem, please file a new issue with code, settings and clear steps to reproduce the issue.
I've seen the same problem. Did you solve? @saiabinesh @martijn-vinotion
Unfortunately I did not manage to solve it. I worked around it by simply setting the segmentation ids to whatever I needed.
nope. @ykpgrr
I can confirm that this is still an issue (Unreal on Ubuntu 16.04), I don't know why it was closed.
Could anyone verified if this is still an issue? I still only get -1 even if I set the segmentation ID to the object first. Also the seg_rgb.txt doesn't really match the segmentation output.
Most helpful comment
Unfortunately I did not manage to solve it. I worked around it by simply setting the segmentation ids to whatever I needed.