-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[UE4] simGetSegmentationObjectID will always return -1 #2854
Comments
LSBOSS
added a commit
to LSBOSS/AirSim
that referenced
this issue
Jul 15, 2020
madratman
pushed a commit
that referenced
this issue
Jul 23, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Intro
Depending on the MeshNamingMethod in SegmentationSettings in AirSim's settings.json custom IDs will be assigned either based on a name of a StaticMesh/SkelletalMesh or the name of its owner.
For that reason
UAirBlueprintLib::GetMeshName
is being used during initialization of IDs to find out the correct name and also taking the different nature of above MeshComponents into account.Problem
However, calling
simGetSegmentationObjectID
from Python ultimately leads to the call ofUAirBlueprintLib::GetMeshStencilID
which is NOT using above GetMeshName method but rather is just comparing the actual name of a MeshComponent (e.g. "StaticMeshComponent0") with the passed search parameter (e.g. "ground") . This ultimately fails and thus this function is returning -1.Example
I added two log outputs. One in
UAirBlueprintLib::GetMeshStencilID
to output every name this function is comparing to the passed search parameter + corresponding custom ID. A second log has been inserted intoUAirBlueprintLib::InitializeObjectStencilID
to output its name handling + corresponding custom IDsFrom the Block environment I chose 4 objects for comparison and then called
print(client.simGetSegmentationObjectID("ground"))
from Python which returns -1.UAirBlueprintLib::InitializeObjectStencilID:
UAirBlueprintLib::GetMeshStencilID:
GetMeshStencilID is comparing the passed parameter "ground" with all the StaticMeshComponent0 it can find which in the end fails.
Fix proposal
Sofware and Versions
Unreal Engine: 4.24.2
AirSim Plugin build from commit: Mon Jun 1 10:30:23 2020 +0530
AirSim Python library: 1.2.8
Python: 3.7.2 32bit
The text was updated successfully, but these errors were encountered: