New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 777739 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

[sensor] sensor.quaternion of RelativeOrientation can’t return current info on Linux

Reported by canx....@intel.com, Oct 24 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Access to https://genericsensors.appspot.com/
2. Click the button at the top right corner
3. Pop-up shows, and choose the "RelativeOrientation" Sensor type, click "ADD" button
4. Check the status and values

What is the expected behavior?
The RelativeOrientation sensor activated is true, and can get the timestamp and quaternion values

What went wrong?
The RelativeOrientation sensor activated and timestamp works fine, but the quaternion values get ‘NaN’.

Did this work before? Yes 63.0.3230.0

Does this work in other browsers? N/A

Chrome version: 63.0.3239.9  Channel: dev
OS Version: Ubuntu 16.04
Flash Version:
 

Comment 1 by canx....@intel.com, Oct 24 2017

Cc: alexander.shalamov@intel.com 
Please take a look, thanks!
Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
@canx.cao -- Thanks for reporting this issue. Could you please let us know on which device model this issue is observed. This would help us in further triaging the issue.
Labels: Needs-Triage-M63

Comment 4 by canx....@intel.com, Oct 26 2017

My test environment:
OS: Linux (Ubuntu 16.04)
Hardware: Dell Inspiron 13 7000 Series.
Thanks!
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 26 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pnangunoori@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: alexande...@intel.com mikhail....@intel.com
Components: Blink>Sensor
Status: Available (was: Unconfirmed)

Comment 8 by canx....@intel.com, Mar 14 2018

This issue still reproduce with the latest Chrome Canary 67.0.3368.0 and Dev 66.0.3359.26 on Chrome OS and Linux.
sensor's quaternion is [NaN, NaN, NaN, NaN].
Labels: Needs-Feedback
On Chrome OS the RelativeOrientation sensor's value is computed using the path:

mojom::SensorType::RELATIVE_ORIENTATION_QUATERNION ->
mojom::SensorType::RELATIVE_ORIENTATION_EULER_ANGLES ->
mojom::SensorType::ACCELEROMETER

What values do you get when you create an Accelerometer using the demo app?

What values do you see on http://code.viget.com/device-motion-demo/?

Comment 10 by canx....@intel.com, Mar 15 2018

1. What values do you get when you create an Accelerometer using the demo app?
The value of Accelerometer sensor: x -0.287, y -0.326, z 9.922

2. What values do you see on http://code.viget.com/device-motion-demo/?
It can not get the valid value of DeviceOrientation.alpha when running the demo on Linux and Chrome OS, please refer to the attachment file.
ChromeOS.jpg
1.0 MB View Download
Cc: juncai@chromium.org
Labels: -Needs-Feedback -Needs-Triage-M63
Ah, what's happening here is that RelativeOrientationEulerAnglesFusionAlgorithmUsingAccelerometer cannot determine the value of alpha from the accelerometer alone. This value is therefore set to NAN as you can see in the screenshot above.

OrientationQuaternionFusionAlgorithmUsingEulerAngles then attempts to compute a quaternion from that and since alpha is NaN all the elements of the quaternion become NaN.

We need to update OrientationQuaternionFusionAlgorithmUsingEulerAngles so that it can produce a reasonable quaterion when the value of alpha is unknown.

Additionally on Linux we should use AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer when both an accelerometer and magnetometer are available.
Cc: -juncai@chromium.org
Owner: juncai@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14dcbf11cb51e32d962f6f6db86cf1a36548d303

commit 14dcbf11cb51e32d962f6f6db86cf1a36548d303
Author: Jun Cai <juncai@chromium.org>
Date: Tue Mar 20 21:44:16 2018

Update OrientationQuaternionFusionAlgorithmUsingEulerAngles to handle alpha is NAN

This CL updated OrientationQuaternionFusionAlgorithmUsingEulerAngles class
to handle the situation when alpha is NAN. This can happen when the euler
angles are obtained from
RelativeOrientationEulerAnglesFusionAlgorithmUsingAccelerometer.

Bug:  777739 
Change-Id: Ica8f5fa12eaa76716db635325f220bac5462920d
Reviewed-on: https://chromium-review.googlesource.com/967425
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544532}
[modify] https://crrev.com/14dcbf11cb51e32d962f6f6db86cf1a36548d303/services/device/generic_sensor/orientation_quaternion_fusion_algorithm_using_euler_angles.cc
[modify] https://crrev.com/14dcbf11cb51e32d962f6f6db86cf1a36548d303/services/device/generic_sensor/orientation_quaternion_fusion_algorithm_using_euler_angles_unittest.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b53d23279982faf724d5a0a7a9165d89504ed1b2

commit b53d23279982faf724d5a0a7a9165d89504ed1b2
Author: Jun Cai <juncai@chromium.org>
Date: Wed Mar 21 20:07:18 2018

Use accelerometer and magnetometer to construct absolute orientation sensor on Linux

This CL updates PlatformSensorProviderLinux to construct a
ABSOLUTE_ORIENTATION_* fusion sensor using ACCELEROMETER and MAGNETOMETER
by using the existing
AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer
and OrientationQuaternionFusionAlgorithmUsingEulerAngles fusion sensor
algorithms.

Bug:  777739 
Change-Id: I179a7096a205affadaac9ac2ac42c40747f7f67d
Reviewed-on: https://chromium-review.googlesource.com/972452
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544817}
[modify] https://crrev.com/b53d23279982faf724d5a0a7a9165d89504ed1b2/services/device/generic_sensor/README.md
[modify] https://crrev.com/b53d23279982faf724d5a0a7a9165d89504ed1b2/services/device/generic_sensor/platform_sensor_and_provider_unittest_linux.cc
[modify] https://crrev.com/b53d23279982faf724d5a0a7a9165d89504ed1b2/services/device/generic_sensor/platform_sensor_provider_linux.cc

Status: Fixed (was: Started)

Comment 17 by canx....@intel.com, Mar 30 2018

QA verified this issue on Chrome 67.0.3381.0 on Linux and 67.0.3383.0 on Chrome OS, it has been fixed.
Absoluteorientation Sensor also works on Linux platform.
Thanks.
Status: Verified (was: Fixed)

Sign in to add a comment