在RDK X5上面运行官方的双目深度估计算法时出错。
相机和开发板的连接图:

系统镜像版本和tros均满足要求,执行如下命令时报错:
# 配置tros.b humble环境
source /opt/tros/humble/setup.bash
# 启动双目模型launch文件,其包含了算法和双目相机节点的启动
ros2 launch hobot_stereonet stereonet_model_web_visual_v2.0.launch.py \
mipi_image_width:=640 mipi_image_height:=352 mipi_lpwm_enable:=True mipi_image_framerate:=15.0 \
need_rectify:=False height_min:=-10.0 height_max:=10.0 pc_max_depth:=5.0错误信息如下:
root@ubuntu:~# ros2 launch hobot_stereonet stereonet_model_web_visual_v2.3.launch.py mipi_image_width:=640 mipi_image_height:=352 mipi_lpwm_enable:=False mipi_image_framerate:=30.0 need_rectify:=False height_min:=-10.0 height_max:=10.0 pc_max_depth:=5.0
[INFO] [launch]: All log files can be found below /root/.ros/log/2025-06-04-19-57-22-645886-ubuntu-10761
[INFO] [launch]: Default logging verbosity is set to INFO
config_file_path is /opt/tros/humble/lib/mipi_cam/config/
Hobot shm pkg enables zero-copy with fastrtps profiles file: /opt/tros/humble/lib/hobot_shm/config/shm_fastdds.xml
Hobot shm pkg sets RMW_FASTRTPS_USE_QOS_FROM_XML: 1
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
webserver has launch
config_file_path is /opt/tros/humble/lib/mipi_cam/config/
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
webserver has launch
config_file_path is /opt/tros/humble/lib/mipi_cam/config/
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
webserver has launch
[INFO] [mipi_cam-1]: process started with pid [10765]
[INFO] [stereonet_model_node-2]: process started with pid [10767]
[INFO] [boost -3]: process started with pid [10769]
[INFO] [boost -3]: process has finished cleanly [pid 10769]
[INFO] [hobot_codec_republish-4]: process started with pid [10771]
[INFO] [websocket-5]: process started with pid [10773]
[hobot_codec_republish-4] [WARN] [1749038243.620288845] [hobot_codec_encoder]: Parameters:
[hobot_codec_republish-4] sub_topic: /StereoNetNode/stereonet_visual
[hobot_codec_republish-4] pub_topic: /image_jpeg
[hobot_codec_republish-4] channel: 1
[hobot_codec_republish-4] in_mode: ros
[hobot_codec_republish-4] out_mode: ros
[hobot_codec_republish-4] in_format: bgr8
[hobot_codec_republish-4] out_format: jpeg
[hobot_codec_republish-4] enc_qp: 10
[hobot_codec_republish-4] jpg_quality: 60
[hobot_codec_republish-4] input_framerate: 30
[hobot_codec_republish-4] output_framerate: -1
[hobot_codec_republish-4] dump_output: 0
[hobot_codec_republish-4] [WARN] [1749038243.635777179] [HobotCodecImpl]: platform x5
[websocket-5] [WARN] [1749038243.650471679] [websocket]:
[websocket-5] Parameter:
[websocket-5] image_topic: /image_jpeg
[websocket-5] image_type: mjpeg
[websocket-5] only_show_image: 1
[websocket-5] output_fps: 0
[mipi_cam-1] [WARN] [1749038243.656694595] [mipi_node]: dual_combine value: 1
[mipi_cam-1] [WARN] [1749038243.656869304] [mipi_node]: frame_ts_type value: sensor
[mipi_cam-1] [WARN] [1749038243.670308929] [mipi_factory]: board_type X5_RDK
[mipi_cam-1]
[mipi_cam-1] [WARN] [1749038243.671344970] [mipi_cam]: this board support mipi:
[mipi_cam-1] [WARN] [1749038243.671558720] [mipi_cam]: host 0
[mipi_cam-1] [WARN] [1749038243.671611845] [mipi_cam]: host 2
[mipi_cam-1] [ERROR] [1749038243.671936137] [mipi_cam]: There are no available host.
[mipi_cam-1]
[ERROR] [mipi_cam-1]: process has died [pid 10765, exit code -11, cmd '/opt/tros/humble/lib/mipi_cam/mipi_cam --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_5d1larq2 --params-file /tmp/launch_params_iimezsv7 --params-file /tmp/launch_params_4py7topp --params-file /tmp/launch_params_kbcsl4xj --params-file /tmp/launch_params_t4vjwh4z --params-file /tmp/launch_params_ux_o54c7 --params-file /tmp/launch_params_1xwe6oan --params-file /tmp/launch_params_ar70d9ny --params-file /tmp/launch_params_zplu0ejc --params-file /tmp/launch_params_5rkeomp4 --params-file /tmp/launch_params_29n3_avs --params-file /tmp/launch_params_um7nm4i7 --params-file /tmp/launch_params_krov8ad7 --params-file /tmp/launch_params_1rdth37o --params-file /tmp/launch_params_wn1_gr20 --params-file /tmp/launch_params_fl0knce3 --params-file /tmp/launch_params_ibumiji6 --params-file /tmp/launch_params_b99d_b6h'].
[stereonet_model_node-2] [BPU_PLAT]BPU Platform Version(1.3.6)!
[stereonet_model_node-2] [HBRT] set log level as 0. version = 3.15.55.0
[stereonet_model_node-2] [DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[stereonet_model_node-2] [19:57:23:914:642] pid=10767 tid=10767 [HBRT 3.15.55.0] (line 265 in alloc_bpu_mem_usage from file=d1d314f3db5c18dae0d474f72ebb3d2844afca41) hbrt memory allocation fails, this memory allocation: 7536640, current total usage: 0, max total usage: 0
[stereonet_model_node-2] [19:57:23:919:609] pid=10767 tid=10767 [HBRT 3.15.55.0] (line 265 in alloc_bpu_mem_usage from file=d1d314f3db5c18dae0d474f72ebb3d2844afca41) hbrt memory allocation fails, this memory allocation: 7536640, current total usage: 0, max total usage: 0
[stereonet_model_node-2] hbrtErrorBPUMemAllocFail
[stereonet_model_node-2] file=d1d314f3db5c18dae0d474f72ebb3d2844afca41
[stereonet_model_node-2] 1194
[stereonet_model_node-2] hbrtErrorBPUMemAllocFail 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 2074
[stereonet_model_node-2] hbrtErrorBPUMemAllocFail 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 2097
[stereonet_model_node-2] hbrtErrorBPUMemAllocFail 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 2376
[stereonet_model_node-2] hbrtErrorBPUMemAllocFail 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 2509
[stereonet_model_node-2] hbrtErrorIllegalHBMHandle 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 2948
[stereonet_model_node-2] hbrtErrorIllegalHBMHandle 3.15.55 file=7b0c25e023bb537c72d2b9349b00937143a7e5f8 3023
[stereonet_model_node-2] [A][DNN][packed_model.cpp:247][Model](2025-06-04,19:57:23.833.490) [HorizonRT] The model builder version = 1.24.3
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83469][10767:10767][ION_ALLOCATOR] <mem_ion_alloc_internal:601> Fail to do ION_IOC_ALLOC(ret=Cannot allocate memory)!
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83469][10767:10767][ION_ALLOCATOR] <mem_alloc_handle_and_buf:750> Fail to allocate ion memory(ret=-12).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83469][10767:10767][ION_ALLOCATOR] <mem_osal_alloc_com_buf:945> Fail to allocate handle and buf(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83469][10767:10767][MEM_ALLOCATOR] <mem_try_alloc_com_buf_locked:297> Fail to allocate memory(Insufficient memory).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83469][10767:10767][MEM_ALLOCATOR] <hb_mem_alloc_com_buf_with_lable:491> Fail to allocate common buffer(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83520][10767:10767][HBMEM] <hbmem_alloc:246> Fail to allocate buffer(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83520][10767:10767][MEM_ALLOCATOR] <hb_mem_invalidate_buf_with_vaddr:3470> Invalid NULL virtual address.
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83520][10767:10767][HBMEM] <hbmem_cache_invalid:601> Fail to invalidate buffer(ret=-16777214).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][ION_ALLOCATOR] <mem_ion_alloc_internal:601> Fail to do ION_IOC_ALLOC(ret=Cannot allocate memory)!
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][ION_ALLOCATOR] <mem_alloc_handle_and_buf:750> Fail to allocate ion memory(ret=-12).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][ION_ALLOCATOR] <mem_osal_alloc_com_buf:945> Fail to allocate handle and buf(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][MEM_ALLOCATOR] <mem_try_alloc_com_buf_locked:297> Fail to allocate memory(Insufficient memory).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][MEM_ALLOCATOR] <hb_mem_alloc_com_buf_with_lable:491> Fail to allocate common buffer(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.83981][10767:10767][HBMEM] <hbmem_alloc:246> Fail to allocate buffer(ret=-16777211).
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.84032][10767:10767][MEM_ALLOCATOR] <hb_mem_invalidate_buf_with_vaddr:3470> Invalid NULL virtual address.
[stereonet_model_node-2] [ERROR][][utils/mem_log.c:94] [7646.84032][10767:10767][HBMEM] <hbmem_cache_invalid:601> Fail to invalidate buffer(ret=-16777214).
[stereonet_model_node-2] [E][DNN][packed_model.cpp:437][Model](2025-06-04,19:57:23.921.217) hybrid model init fail
[stereonet_model_node-2] [E][DNN][packed_model.cpp:170][Model](2025-06-04,19:57:23.923.268) Load model failed, model file:/opt/tros/humble/share/hobot_stereonet/config/V22_disp96.bin
[stereonet_model_node-2] [BPU ERROR]hbDNNInitializeFromFiles failederror code:
[stereonet_model_node-2] [E][DNN][hb_dnn.cpp:116][Model](2025-06-04,19:57:23.923.770) packed dnn handle is invalid
[stereonet_model_node-2] [BPU ERROR]hbDNNGetModelNameList failederror code:
[stereonet_model_node-2] Modle count <= 0
[stereonet_model_node-2] [E][DNN][hb_dnn.cpp:116][Model](2025-06-04,19:57:23.923.825) packed dnn handle is invalid
[stereonet_model_node-2] [BPU ERROR]hbDNNGetModelNameList failederror code:
[stereonet_model_node-2] Modle count <= 0
[stereonet_model_node-2] [FATAL] [1749038243.923863720] [StereoNetNode]: stereonet model init failed
[stereonet_model_node-2] [FATAL] [1749038243.924661720] [StereoNetNode]: Node start failed
[hobot_codec_republish-4] [ERROR] [1749038248.636239681] [hobot_codec_encoder]: Hobot_Codec has not received image for more than 5 seconds! Please check whether the image publisher still exists by 'ros2 topic info /StereoNetNode/stereonet_visual'!
[websocket-5] [ERROR] [1749038248.670798973] [websocket]: Websocket did not receive image data! Please check whether the image publisher still exists by 'ros2 topic info /image_jpeg'!
[hobot_codec_republish-4] [ERROR] [1749038253.636203767] [hobot_codec_encoder]: Hobot_Codec has not received image for more than 5 seconds! Please check whether the image publisher still exists by 'ros2 topic info /StereoNetNode/stereonet_visual'!
[websocket-5] [ERROR] [1749038253.670777933] [websocket]: Websocket did not receive image data! Please check whether the image publisher still exists by 'ros2 topic info /image_jpeg'!
^Z
[10]+ Stopped ros2 launch hobot_stereonet stereonet_model_web_visual_v2.3.launch.py mipi_image_width:=640 mipi_image_height:=352 mipi_lpwm_enable:=False mipi_image_framerate:=30.0 need_rectify:=False height_min:=-10.0 height_max:=10.0 pc_max_depth:=5.0