Skip to content

Fix imu report (linear acceleration and angular velocity)#168

Open
naoki-mizuno wants to merge 2 commits into
chrippa:masterfrom
naoki-mizuno:fix-imu-report
Open

Fix imu report (linear acceleration and angular velocity)#168
naoki-mizuno wants to merge 2 commits into
chrippa:masterfrom
naoki-mizuno:fix-imu-report

Conversation

@naoki-mizuno

Copy link
Copy Markdown

I've noticed that the linear acceleration and angular velocity reported from the device is incorrect. I looked into this problem and found that the order of fields were incorrect. With this PR the linear acceleration and angular velocity become consistent.

The following axis orientation is used (since I couldn't find any specific convention used in the code):

X: points to the right
Y: points up
Z: points towards the person holding the device

If needed I can post plots that I used to confirm that the fix is indeed consistent with the axis orientation above.

The following websites were references:

The order of acceleration and angular velocity fields are fixed so the
reported values are correct. The axis orientation is positive X pointing
right, positive Y pointing up, and positive Z pointing towards the user.

For the angular velocities, the following convention is used for the
names (following the right thumb rule):

Roll: rotation around X axis
Pitch: rotation around Y axis
Yaw: rotation around Z axis

The code has been tested by checking that the sign of the values are
consistent with the axis orientation when translating/rotating the
device.

References:
- https://gamedev.stackexchange.com/a/87178
- http://eleccelerator.com/wiki/index.php?title=DualShock_4#Report_Structure
The roll-pitch-yaw convention differs among industries, thus, is better
to explicitly state the axis which rotation is considered. The field
names also explicitly states that the values are "angular velocity" and
"linear acceleration," as opposed to "orientation" and "motion," which
are ambiguous (and technically incorrect).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant