-
Notifications
You must be signed in to change notification settings - Fork 47
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
How to hide vehicles before shooting? #260
Comments
Hi, local function getFullCameraRequest(sensorId)
Engine.Annotation.enable(true)
AnnotationManager.setInstanceAnnotations(false)
local semanticData = Research.GpuRequestManager.sendBlockingCameraGpuRequest(sensorId)
AnnotationManager.setInstanceAnnotations(true)
local instanceData = Research.GpuRequestManager.sendBlockingCameraGpuRequest(sensorId)
AnnotationManager.setInstanceAnnotations(false)
Engine.Annotation.enable(false)
local out = {}
out['colour'] = instanceData['colour']
out['annotation'] = semanticData['annotation']
out['depth'] = instanceData['depth']
out['instance'] = instanceData['annotation']
return out
end Also, if you do not need both the instance and object annotation readings, you should use the To avoid despawning the other vehicles, you can make them transparent instead. Try whether this function works for your usecase: def set_visibility(beamng: BeamNGpy, vehicle: Vehicle, alpha: float):
beamng.queue_lua_command(f'core_vehicle_partmgmt.setHighlightedPartsVisiblity({alpha}, scenetree.findObject("{vehicle.vid}"):getID())')
set_visibility(beamng, ego, 0.0) # make invisible
set_visibility(beamng, ego, 1.0) # make visible |
Sorry, there has been an error in the def set_visibility(beamng: BeamNGpy, vehicle: Vehicle, alpha: float):
beamng.queue_lua_command(f'core_vehicle_partmgmt.setHighlightedPartsVisiblity({alpha}, scenetree.findObject("{vehicle.vid}"):getID())') Also, you should ensure that |
I want to hide the specified car when shooting with the camera. I bound the camera to the ego car and removed the remaining cars before shooting with the camera. However, the following error message will appear. How can I implement this function? Does beamng have a visible interface?
I used traffic flow and captured all participating vehicles:
I retrieve vehicle information through the following code, and then delete the vehicle:
Then I capture images:
But I received the following error message:
BeamNG 0.31.3
BeamNGpy 1.28
The text was updated successfully, but these errors were encountered: