【发布时间】: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
【问题讨论】: