【问题标题】:Unable to get imu streams in my realsense camera D435i无法在我的 realsense 相机 D435i 中获取 imu 流
【发布时间】:2021-04-08 06:55:57
【问题描述】:

我正在尝试从 D435i 相机获取 IMU 数据,但无法这样做。浏览各种 github 问题,我得到了代码 sn-p,它是直截了当的,但由于某种原因它仍然无法正常工作。任何帮助将不胜感激。

下面是我使用的sn-p:

import numpy as np             
import pyrealsense2 as rs      

pipeline = rs.pipeline()       
config = rs.config()
config.enable_stream(rs.stream.accel, rs.format.motion_xyz32f, 200)
config.enable_stream(rs.stream.gyro, rs.format.motion_xyz32f, 200)
pipeline.start(config)
  
while True:
    frames = pipeline.wait_for_frames()      
    for frame in frames:       
        motion_data = frame.as_motion_frame().get_motion_data()
        print(np.array([motion_data.x, motion_data.y, motion_data.z]))

由于某种原因,错误出现在pipeline.start(config) 行,上面写着RuntimeError: Couldn't resolve requests。我使用的 librealsense 版本是2.14

【问题讨论】:

    标签: python intel realsense


    【解决方案1】:

    我认为您的程序失败了,因为 D435i 的陀螺仪和加速度计以不同的速率工作。

    流水线配置见下例:

    pipeline = rs.pipeline()
    config = rs.config()
    # Configuring streams at different rates
    # Accelerometer available FPS: {63, 250}Hz
    config.enable_stream(rs.stream.accel, rs.format.motion_xyz32f, 250)  # acceleration
    # Gyroscope available FPS: {200,400}Hz
    config.enable_stream(rs.stream.gyro, rs.format.motion_xyz32f, 200)  # gyroscope
    pipeline.start(config)
    

    更多信息可以在这里找到:https://www.intelrealsense.com/how-to-getting-imu-data-from-d435i-and-t265/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 2020-11-06
      • 1970-01-01
      • 2018-01-04
      相关资源
      最近更新 更多