Scenario:
I'm developing application to detect the surface for measurement, I'm using ARCore SDK for this purpose which works perfectly fine for HORIZONTAL VIEW but the issue is on vertical analyzing part as it didn't show any dots to detect the surface.
sceneView = findViewById<ARSceneView?>(R.id.sceneView).apply {
planeRenderer.isEnabled = true
configureSession { session, config ->
config.depthMode = when (session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)) {
true -> {Config.DepthMode.AUTOMATIC
}
else -> Config.DepthMode.DISABLED
}
config.planeFindingMode = Config.PlaneFindingMode.VERTICAL
config.depthMode = Config.DepthMode.AUTOMATIC
config.instantPlacementMode = Config.InstantPlacementMode.LOCAL_Y_UP
config.lightEstimationMode = Config.LightEstimationMode.ENVIRONMENTAL_HDR
// config.updateMode=Config.UpdateMode.LATEST_CAMERA_IMAGE
}
onSessionUpdated = { _, frame ->
if (anchorNode == null) {
frame.getUpdatedPlanes()
.firstOrNull { it.type == Plane.Type.VERTICAL }
?.let { plane ->
// addAnchorNode(plane.createAnchor(plane.centerPose))
}
}
}
onTrackingFailureChanged = { reason ->
[email protected] = reason
Toast.makeText(this@MainActivity, "$reason", Toast.LENGTH_SHORT).show()
}
onSessionFailed={ fail->
Toast.makeText(this@MainActivity, "$fail", Toast.LENGTH_SHORT).show()
}
onSessionUpdated={
session, frame ->
// Toast.makeText(this@MainActivity, "$session", Toast.LENGTH_SHORT).show()
}
}
Above code works fine on Horizontal plane but when we change the configureSession to Vertical it didn't detect any vertical plane for any vertical texture.
Already tried
config.planeFindingMode = Config.PlaneFindingMode.VERTICAL