Jump to content

WVR camera access issue


bleater

Recommended Posts

I'd like to use the Focus Plus' cameras in an app that already includes full 6 DoF tracking.

However, I cannot get the camera stream to even start. When I trigger WVR_StartCamera, I get error return status. In the log I see these messages:

 

2020-01-13 17:30:40.275 14128-14128/com.nobody.cameratestapp D/CAMERATESTNATIVE: ====== STARTING CAMERA ======
2020-01-13 17:30:40.275 14128-14128/com.nobody.cameratestapp I/SVRI: StartCamera, (curTrackingMode, oldTrackingMode) = (3, 3)
2020-01-13 17:30:40.275 14128-14128/com.nobody.cameratestapp D/VRCORE: SvrVRCamera::StartCamera
2020-01-13 17:30:40.277 14128-14128/com.nobody.cameratestapp I/QVRDebug: QVRDebug: set log level to 7
2020-01-13 17:30:40.278 14128-14266/com.nobody.cameratestapp I/WVRFoveat: EnableFoveation: 0 1 >>>
2020-01-13 17:30:40.278 14128-14266/com.nobody.cameratestapp I/WVRFoveat: EnableFoveation: 0 1 1 <<<
2020-01-13 17:30:40.279 14128-14266/com.nobody.cameratestapp I/POSE: GetSyncPose pose_hmd_1 CV(s1f0) om0 6DoF 1vw_t0o0 XYZ -0.0142 0.0466 -0.0315 YPR -4.2970 16.3856 -0.7524 ; Wxyz 0.9890 0.1426 -0.0380 -0.0012 ; RAW XYZ 0.0142 -0.0466 0.0315 Wxyz 0.9890 -0.1426 0.0380 0.0012 ; LVel 0.004 0.003 0.006 LAc -0.00 -0.00 -0.00 AngV -0.030 0.019 -0.013 AngAc -0.00 -0.00 -0.00 ; TS26948419104386 4.77ms GetPoseState
2020-01-13 17:30:40.279 14128-14266/com.nobody.cameratestapp I/POSE: GetSyncPose pose_clr_3 CV(s1f0) om0 6DoF 1vw_t0o0 XYZ 0.2325 -0.4649 -0.1669 YPR -4.3538 -23.9804 2.7531 ; Wxyz 0.9770 -0.2084 -0.0421 0.0156 ; RAW XYZ 0.2325 -0.4649 -0.1669 Wxyz 0.9770 -0.2084 -0.0421 0.0156 ; LVel 0.004 0.006 -0.003 LAc 0.25 -0.14 0.42 AngV 0.048 -0.026 -0.027 AngAc 0.00 0.00 0.00 ; TS26948416845287 0.00ms GetPoseState
2020-01-13 17:30:40.280 14128-14128/com.nobody.cameratestapp E/QVRSocketUtil: int doSendReceivePacket(QVRSocket *, QVRSocketPkt_t *, QVRSocketPkt_t *, bool) (14128): error occurred
2020-01-13 17:30:40.280 14128-14128/com.nobody.cameratestapp E/QVRClientImpl: capability handshake failed
2020-01-13 17:30:40.280 14128-14128/com.nobody.cameratestapp E/QVRClientImpl: Capability Handshake failed!
2020-01-13 17:30:40.280 14128-14128/com.nobody.cameratestapp E/VRCORE: Qvr Device Helper is null
2020-01-13 17:30:40.280 14128-14128/com.nobody.cameratestapp E/CAMERATESTNATIVE:  ====== FAILED TO START CAMERA ======

it looks like a failure in one of the underlying APIs.

As can be seen from the log, I am following the documented requirement of calling WVR_StartCamera from the main thread (pid & tid 14128 in this case).

Any ideas? Anyone ever had this API working? Am I right to assume that this can be called even though I'm using 6DoF tracking in the app already?

Link to comment
Share on other sites

The video passthrough via double-tap works.

I logged a bit more info also from other processes:

2020-01-15 17:36:40.973 7550-7550/com.nobody.cameratestapp CAMERATESTNATIVE: ====== STARTING CAMERA ======
2020-01-15 17:36:40.973 7550-7550/com.nobody.cameratestapp I/SVRI: StartCamera, (curTrackingMode, oldTrackingMode) = (3, 3)
2020-01-15 17:36:40.973 7550-7550/com.nobody.cameratestapp D/VRCORE: SvrVRCamera::StartCamera
2020-01-15 17:36:40.975 7550-7550/com.nobody.cameratestapp I/QVRDebug: QVRDebug: set log level to 7
2020-01-15 17:36:40.976 846-1066/? E/QVRServiceConnectionMgr: qvrservice_camera: Added client fd = 241, total connected clients = 1
2020-01-15 17:36:40.976 846-1066/? E/QVRConnection: HandleDataPacket Command QVRSOCKET_CMD_REGISTER (17)
2020-01-15 17:36:40.976 7550-7725/com.nobody.cameratestapp I/WVRFoveat: EnableFoveation: 0 >>>
2020-01-15 17:36:40.976 7550-7725/com.nobody.cameratestapp I/WVRFoveat: EnableFoveation: 0 1 1 <<<
2020-01-15 17:36:40.976 7913-7913/? W/VRCORE_Client: DeviceMirror::GetPose 3 returns false due to 0 .
2020-01-15 17:36:40.976 7550-7725/com.nobody.cameratestapp W/WVR_COMMON: GetPoseState failed! WVR_DeviceType_Controller_Left GetPose form VRSystemStub failed
2020-01-15 17:36:40.977 846-1066/? W/ServiceManager: Permission failure: android.permission.CAMERA from uid=10074 pid=7550
2020-01-15 17:36:40.977 846-1066/? E/QVRConnection: checkAndroidPermission failed for pid=7550 uid=10074
2020-01-15 17:36:40.977 846-1066/? E/QVRConnection: HandleDataPacket: failure
2020-01-15 17:36:40.977 846-1066/? E/QVRConnection: HandleDataPacket Command QVRSOCKET_CMD_CAPABILITY (29)
2020-01-15 17:36:40.977 846-1066/? E/QVRConnection: Detected Client version: 2.0.5 api: 3
2020-01-15 17:36:40.977 7550-7550/com.nobody.cameratestapp E/QVRSocketUtil: int doSendReceivePacket(QVRSocket *, QVRSocketPkt_t *, QVRSocketPkt_t *, bool) (7550): error occurred
2020-01-15 17:36:40.977 7550-7550/com.nobody.cameratestapp E/QVRClientImpl: capability handshake failed
2020-01-15 17:36:40.977 7550-7550/com.nobody.cameratestapp E/QVRClientImpl: Capability Handshake failed!
2020-01-15 17:36:40.977 7550-7550/com.nobody.cameratestapp E/VRCORE: Qvr Device Helper is null
2020-01-15 17:36:40.977 7550-7550/com.nobody.cameratestapp CAMERATESTNATIVE:  ====== FAILED TO START CAMERA ======

It looks like permission android.permission.CAMERA is needed, although this is not mentioned in the docs. Does the standard Android camera permission API work in this case?

Link to comment
Share on other sites

I have determined that the standard permissions request method does not work for android.permission.CAMERA on the Wave platform. So at this stage I'm a little stuck; the OS expects the app to have that permission but there seems to be no way to request it from the OS.

Edited by bleater
fix typo
Link to comment
Share on other sites

  • 2 weeks later...

OK, I've found the problem and it was my mistake. There was a missing parameter in my call to the permissions request which meant that the permissions was not being asked correctly on the Wave platform. It's working now! Thanks for your patient help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...