简体   繁体   English

加速度计和磁力计传感器融合以获得陀螺仪数据

[英]Accelerometer and Magnetometer sensor fusion to get Gyroscopic Data

I am making a raspberry pi robot with an FVP (First Person View) camera mounted on a Pan/tilt Servo. 我正在用安装在云台伺服器上的FVP(第一人称视角)相机制作一个树莓派机器人。 I want to make it VR compatible by connecting it to my Phone. 我想通过将其连接到手机使其与VR兼容。 But my phone doesn't have Gyroscope sensor to detect horizontal movements, but it has magnetometer and accelerometer. 但是我的手机没有陀螺仪传感器来检测水平运动,但是有磁力计和加速度计。 How can I combine data from accelerometer and magnetometer to make a virtual gyroscope that can move with my camera. 我如何结合来自加速度计和磁力计的数据来制作可以随相机移动的虚拟陀螺仪。 I am noob in all of these. 我在所有这些方面都是菜鸟。

You should have an rotation vector sensor that is already fusing the two. 您应该有一个已经将两者融合在一起的旋转矢量传感器 You will not get better results than it. 您将不会获得比它更好的结果。

Note that this will not be as high quality as a proper gyroscope and will have artifacts if the robot moves. 请注意,这将不如适当的陀螺仪那样高品质,并且如果机器人移动,将会产生伪影。

If you're still interested in how to make this yourself, you can get roll and pitch information from the accelerometer, then get the yaw information from the magnetometer. 如果您仍然对如何自己制造感兴趣,则可以从加速度计获取横摇和俯仰信息,然后从磁力计获取横摆信息。 Best if you find a library for 3d maths and do this with quaternions or matrices. 最好是找到一个3D数学库,并使用四元数或矩阵进行此操作。 This seems like a use case where you will be affected by gimbal locks easily, so euler angles will be problematic. 这似乎是一个用例,您很容易受到万向节锁的影响,因此欧拉角会成问题。

I guess you want to use this for VR? 我想您想将此用于VR吗? Don't try to move the servos to compensate for head movement directly, you'll only make a motion sickness generator. 不要试图移动伺服器来直接补偿头部的运动,您只会制造一个晕车发生器。 Look at how timewarp works - you move the servos in the general direction a person is looking at and render the video reprojected on a sphere - this way you have almost zero lag. 看一下时间扭曲的工作原理-将伺服器沿人们正在观察的大致方向移动,并将视频重新投影到球体上-这样,您几乎可以将延迟保持为零。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android中获取原始加速度计和磁力计数据? - How to get raw accelerometer and Magnetometer data in Android? 如何在同一Java类中将两个传感器管理器用于加速度计和磁力计 - How to use Two Sensor Manager for Accelerometer and Magnetometer in the same Java class 如何从加速度计和磁力计传感器计算android中的旋转矩阵 - How to calculate Rotation Matrix in android from accelerometer and magnetometer sensor 为什么使用加速度计和磁力计来获得罗盘值 - why use accelerometer and magnetometer to get compass values Android手机中的磁力计传感器获取方向 - Magnetometer sensor in android mobile to get directions 对于加速计传感器的获取数据片段类型,方法findViewById(int)未定义 - The method findViewById(int) is undefined for the type Get Data Fragment for Accelerometer Sensor 卡尔曼滤波器传感器融合以进行FALL检测:加速度计+陀螺仪 - Kalman filter sensor fusion for FALL detection: Accelerometer + Gyroscope android传感器数据的线性化(加速度计) - Linearization of android sensor data (Accelerometer) 不同的传感器(磁力计,加速度计)如何工作以制作指南针-Android(Java) - How does different sensor(magnetometer, accelerometer) work to make compass - Android (Java) 将加速度传感器数据写入文件不正确 - Writing accelerometer sensor data to file is out of order
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM