Basalt VIO
Basalt VIO
Supported on:RVC2
VSLAM 主节点默认在
depthai-core 主分支上可用,但它们仍处于抢先体验阶段,可能不如其他节点稳定或经过充分测试。管道
源代码
Python
PythonGitHub
1import signal
2import time
3import depthai as dai
4from rerun_node import RerunNode
5# Create pipeline
6
7with dai.Pipeline() as p:
8 fps = 60
9 width = 640
10 height = 400
11 # Define sources and outputs
12 left = p.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_B, sensorFps=fps)
13 right = p.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_C, sensorFps=fps)
14 imu = p.create(dai.node.IMU)
15 odom = p.create(dai.node.BasaltVIO)
16
17 rerunViewer = p.create(RerunNode)
18 imu.enableIMUSensor([dai.IMUSensor.ACCELEROMETER_RAW, dai.IMUSensor.GYROSCOPE_RAW], 200)
19 imu.setBatchReportThreshold(1)
20 imu.setMaxBatchReports(10)
21
22 # Linking
23 left.requestOutput((width, height)).link(odom.left)
24 right.requestOutput((width, height)).link(odom.right)
25 imu.out.link(odom.imu)
26 odom.passthrough.link(rerunViewer.inputImg)
27 odom.transform.link(rerunViewer.inputTrans)
28 p.start()
29 while p.isRunning():
30 time.sleep(0.01)需要帮助?
请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。