将角速度转换为方向Wii Motionplus [英] Converting angular velocities to orientation Wii Motionplus

查看:136
本文介绍了将角速度转换为方向Wii Motionplus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究Wii Motionplus,并且已经使用WiimoteLib库提取了原始值.但是,当我对其进行归一化时,我得到的随机值与实际发生的情况不符.

I'm working on the Wii Motionplus and I've extracted the raw values using WiimoteLib Library. However, when I normalize it, I get random values that don't tally with what is actually happening.

这是我的规范化方法:

  1. 校准Motionplus(即找到与零相对应的原始值;我可以通过将其保持静止一段时间来实现此目的)

  1. Calibrate the Motionplus (i.e. Find the raw value that corresponds to zero; I do this by holding it stationary for a point of time)

对于每个后续读取的原始值,我从中减去零值以获得相对"原始值.

For every subsequent raw value read, I subtract the zero value from it to get the "relative" raw value.

然后,我使用 http://wiibrew.org/wiki/Wiimote/Extension_Controllers (检查yaw_fast,pitch_fast等),其中使用度量(原始值8192对应于595度/秒)计算数值

Then, I scale this value using http://wiibrew.org/wiki/Wiimote/Extension_Controllers (checking for yaw_fast, pitch_fast etc.), where the numerical values are computed using the measure (raw value of 8192 corresponds to 595 deg/s)

我将所有这些值随时间求和(离散积分),以得出Wiimote初始方向的角度.

I sum up all these values over time (discrete integration) to get the angle of the wiimote wrt initial orientation.

但是,当我计算该值并将其绘制在图形上时,其中一个轴的阶跃变化不会反映在图形中.我尝试使用数字罗盘与之进行比较,但当罗盘正确反映值时,wii值却完全不同(即使模式也不相同)

However, when I calculate this and plot it out on a graph, a step change in one of the axes is NOT being reflected in the graph. I tried using a digital compass with it to compare, but while the compass reflects the values correctly, the wii values are completely different (even the pattern is not the same)

有人可以告诉我规范化在哪里出问题吗?

Can anyone tell me where I'm going wrong with the normalization?

谢谢!

推荐答案

正在发送的数字是围绕各自的x y和z轴的旋转.为了将其与x,y,z坐标相关联,您将需要使用旋转矩阵,并且由于旋转读数不是固定轴,而是取决于您所处的方向,因此您需要使用欧拉矩阵将其与固定的x,y,z坐标

The numbers that are being sent out are rotations about the x y and z axis respective to itself. In order to relate this to x,y,z coordinates you will need to use a rotation matrix, and since the rotation readings are not a fixed axis but depend on what orientation you are at you need to use a Euler Matrix to relate this to a fixed x,y,z coordinate

换句话说,您正在接收侧倾,偏航和俯仰速度,并且需要使用欧拉矩阵将其与笛卡尔坐标相关联.一旦知道了初始的侧倾,俯仰和偏航,您就可以简单地将下一个侧倾,俯仰和偏航读数添加到该初始时间乘以该读数适用的时间间隔.

In other words you are receiving roll, yaw and pitch velocities and you need to use a Euler Matrix to relate this to cartessian coordinates. Once you know your initial roll, pitch and yaw you can simply add your next reading of roll, pitch and yaw to that initial times the time interval that that reading applies to.

ROLL是绕y轴旋转

ROLL is Rotation about the y-axis

俯仰是绕x轴旋转

YAW是绕z轴旋转

这篇关于将角速度转换为方向Wii Motionplus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆