[RDKx5][TROS]tros部署yolov10模型报错,dnn_example_node 进程意外退出,退出代码是 -11,段错误

启动launch文件后如下:

[INFO] [launch]: All log files can be found below /root/.ros/log/2025-05-17-22-37-51-274970-ubuntu-25685
[INFO] [launch]: Default logging verbosity is set to INFO
dnn_node_example_path is  /opt/tros/humble/lib/dnn_node_example
cp_cmd is  cp -r /opt/tros/humble/lib/dnn_node_example/config .
camera_type is  usb
using usb cam
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
config_file_path is  /opt/tros/humble/lib/hobot_usb_cam/config/usb_camera_calibration.yaml
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
env of RMW_FASTRTPS_USE_QOS_FROM_XML is  1 , ignore env setting
config_file_path is  /opt/tros/humble/lib/hobot_usb_cam/config/usb_camera_calibration.yaml
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] [hobot_usb_cam-1]: process started with pid [25696]
[INFO] [hobot_codec_republish-2]: process started with pid [25698]
[INFO] [example-3]: process started with pid [25700]
[INFO] [websocket-4]: process started with pid [25702]
[hobot_codec_republish-2] [WARN] [1747492671.802070011] [hobot_codec_decoder]: Parameters:
[hobot_codec_republish-2] sub_topic: /image
[hobot_codec_republish-2] pub_topic: /hbmem_img
[hobot_codec_republish-2] channel: 1
[hobot_codec_republish-2] in_mode: ros
[hobot_codec_republish-2] out_mode: shared_mem
[hobot_codec_republish-2] in_format: jpeg
[hobot_codec_republish-2] out_format: nv12
[hobot_codec_republish-2] enc_qp: 10
[hobot_codec_republish-2] jpg_quality: 60
[hobot_codec_republish-2] input_framerate: 30
[hobot_codec_republish-2] output_framerate: -1
[hobot_codec_republish-2] dump_output: 0
[hobot_codec_republish-2] [WARN] [1747492671.808657731] [HobotCodecImpl]: platform x5
[hobot_usb_cam-1] [WARN] [1747492671.975677688] [hobot_usb_cam]: framerate: 30
[hobot_usb_cam-1] [WARN] [1747492671.976285424] [hobot_usb_cam]: pixel_format_name: mjpeg
[hobot_usb_cam-1] [WARN] [1747492672.003019380] [hobot_usb_cam]: Camera calibration file: [/opt/tros/humble/lib/hobot_usb_cam/config/usb_camera_calibration.yaml] does not exist!
[hobot_usb_cam-1] If you need calibration msg, please make sure the calibration file path is correct and the calibration file exists!
[hobot_usb_cam-1] [WARN] [1747492672.013583758] [hobot_usb_cam]: Try to open device [/dev/video0]
[example-3] [WARN] [1747492672.115126592] [dnn_example_node]: Parameter:
[example-3]  feed_type(0:local, 1:sub): 1
[example-3]  image: config/test.jpg
[example-3]  image_type: 0
[example-3]  dump_render_img: 0
[example-3]  is_shared_mem_sub: 1
[example-3]  config_file: /home/sunrise/config/wrhos_config.json
[example-3]  msg_pub_topic_name: hobot_dnn_detection
[example-3]  info_msg_pub_topic_name: hobot_dnn_detection_info
[example-3]  ros_img_topic_name: /image
[example-3]  sharedmem_img_topic_name: /hbmem_img
[example-3] [WARN] [1747492672.116044571] [dnn_example_node]: Load [102] class types from file [/home/sunrise/config/wrhos.list]
[example-3] [WARN] [1747492672.116183943] [dnn_example_node]: Parameter:
[example-3]  model_file_name: /home/sunrise/Downloads/wrhos_detect_modified.bin
[example-3]  model_name:
[example-3] [WARN] [1747492672.116251941] [dnn_example_node]: model_file_name_: /home/sunrise/Downloads/wrhos_detect_modified.bin, task_num: 4
[example-3] [BPU_PLAT]BPU Platform Version(1.3.6)!
[example-3] [HBRT] set log level as 0. version = 3.15.55.0
[example-3] [DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[websocket-4] [WARN] [1747492672.163723039] [websocket]:
[websocket-4] Parameter:
[websocket-4]  image_topic: /image
[websocket-4]  image_type: mjpeg
[websocket-4]  only_show_image: 0
[websocket-4]  smart_topic: hobot_dnn_detection
[websocket-4]  output_fps: 0
[hobot_usb_cam-1] [WARN] [1747492672.274096416] [hobot_usb_cam]: This devices supproted formats:
[hobot_usb_cam-1] [WARN] [1747492672.274338702] [hobot_usb_cam]:        Motion-JPEG: 1920 x 1080 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274418617] [hobot_usb_cam]:        Motion-JPEG: 1280 x 720 (31 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274472449] [hobot_usb_cam]:        Motion-JPEG: 1280 x 1024 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274520323] [hobot_usb_cam]:        Motion-JPEG: 320 x 240 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274565739] [hobot_usb_cam]:        Motion-JPEG: 640 x 480 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274611363] [hobot_usb_cam]:        Motion-JPEG: 800 x 600 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274656862] [hobot_usb_cam]:        Motion-JPEG: 1024 x 768 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274701819] [hobot_usb_cam]:        YUYV 4:2:2: 1920 x 1080 (5 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274746360] [hobot_usb_cam]:        YUYV 4:2:2: 1280 x 720 (9 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274791525] [hobot_usb_cam]:        YUYV 4:2:2: 1280 x 1024 (6 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274835899] [hobot_usb_cam]:        YUYV 4:2:2: 320 x 240 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274879731] [hobot_usb_cam]:        YUYV 4:2:2: 640 x 480 (30 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274923605] [hobot_usb_cam]:        YUYV 4:2:2: 800 x 600 (21 Hz)
[hobot_usb_cam-1] [WARN] [1747492672.274967604] [hobot_usb_cam]:        YUYV 4:2:2: 1024 x 768 (13 Hz)
[example-3] [A][DNN][packed_model.cpp:247][Model](2025-05-17,22:37:52.203.852) [HorizonRT] The model builder version = 1.24.3
[example-3] [WARN] [1747492672.324386407] [dnn_example_node]: Get model name: wrhos_detect from load model.
[example-3] [WARN] [1747492672.324555362] [dnn_example_node]: Create ai msg publisher with topic_name: hobot_dnn_detection
[example-3] [WARN] [1747492672.338553618] [dnn_example_node]: Create img hbmem_subscription with topic_name: /hbmem_img
[hobot_usb_cam-1] [WARN] [1747492673.076707862] [hobot_usb_cam]: Open & Init device /dev/video0 success.
[example-3] [WARN] [1747492673.365031849] [dnn_example_node]: Loaned messages are only safe with const ref subscription callbacks. If you are using any other kind of subscriptions, set the ROS_DISABLE_LOANED_MESSAGES environment variable to 1 (the default).
[example-3] [WARN] [1747492673.365368883] [dnn_example_node]: Recved img encoding: nv12, h: 600, w: 800, step: 800, index: 0, stamp: 1747492672_278568000, data size: 720000, comm delay [1086.7771]ms
[ERROR] [example-3]: process has died [pid 25700, exit code -11, cmd '/opt/tros/humble/lib/dnn_node_example/example --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_0o82cfb6 --params-file /tmp/launch_params_rjyvzq0l --params-file /tmp/launch_params_mgd7dtmt --params-file /tmp/launch_params_8tmetjky --params-file /tmp/launch_params_uswcn1r4'].
[hobot_codec_republish-2] [WARN] [1747492676.840231655] [hobot_codec_decoder]: Pub img fps [14.80]
[websocket-4] [ERROR] [1747492677.191994504] [websocket]: Websocket did not receive AI data! Please check whether the AI data publisher still exists by 'ros2 topic info hobot_dnn_detection'!
[hobot_codec_republish-2] [WARN] [1747492681.847645455] [hobot_codec_decoder]: Pub img fps [19.98]
[websocket-4] [ERROR] [1747492682.191604940] [websocket]: Websocket did not receive AI data! Please check whether the AI data publisher still exists by 'ros2 topic info hobot_dnn_detection'!

ERROR位于倒数第三行处

workconfig内容如下:

{
	"model_file": "/home/sunrise/Downloads/wrhos_detect_modified.bin",
	"task_num": 4,
	"dnn_Parser": "yolov10",
	"model_output_count": 6,
	"reg_max": 16,
	"class_num": 102,
	"cls_names_list": "/home/sunrise/config/wrhos.list",
	"strides": [8, 16, 32],
	"score_threshold": 0.25,
	"top_k": 300
}

模型输入输出信息如下:

hrt_model_exec model_info --model_file /home/sunrise/Downloads/wrhos_detect_modified.bin
I0000 00:00:00.000000 29601 vlog_is_on.cc:197] RAW: Set VLOG level for "*" to 3
[BPU_PLAT]BPU Platform Version(1.3.6)!
[HBRT] set log level as 0. version = 3.15.55.0
[DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[A][DNN][packed_model.cpp:247][Model](2025-05-17,22:47:55.329.986) [HorizonRT] The model builder version = 1.24.3
Load model to DDR cost 179.409ms.
This model file has 1 model:
[wrhos_detect]
---------------------------------------------------------------------
[model name]: wrhos_detect

input[0]:
name: images
input source: HB_DNN_INPUT_FROM_PYRAMID
valid shape: (1,3,640,640,)
aligned shape: (1,3,640,640,)
aligned byte size: 614400
tensor type: HB_DNN_IMG_TYPE_NV12
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (0,0,0,0,)

output[0]:
name: output0
valid shape: (1,80,80,103,)
aligned shape: (1,80,80,103,)
aligned byte size: 2636800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (2636800,32960,412,4,)

output[1]:
name: 485
valid shape: (1,80,80,64,)
aligned shape: (1,80,80,64,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: SCALE
stride: (1638400,20480,256,4,)
scale data: 0.000385131,0.000332978,0.000307084,0.000359055,0.000276084,0.000254931,0.00022776,0.000235601,0.000203689,0.000119715,0.000153907,0.000116524,7.92784e-05,5.85812e-05,5.96297e-05,7.97342e-05,0.000395708,0.000335166,0.000349208,0.00039899,0.000311096,0.000306537,0.000233231,0.000220101,0.000197307,0.00014488,9.35475e-05,7.15739e-05,6.23194e-05,5.72591e-05,5.38856e-05,8.63446e-05,0.000367625,0.000354131,0.000334619,0.000406284,0.000285931,0.000356684,0.000238337,0.000181351,0.00019986,0.000180713,0.000146065,0.000112512,8.69372e-05,6.80636e-05,5.50253e-05,8.61166e-05,0.000440202,0.000355225,0.000307996,0.000320213,0.000361425,0.000356502,0.000238519,0.000204966,0.000257119,0.000205878,0.000157371,0.000168404,0.000134212,0.000101571,8.23784e-05,0.000168404,
quantizeAxis: 3

output[2]:
name: 499
valid shape: (1,40,40,103,)
aligned shape: (1,40,40,103,)
aligned byte size: 659200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (659200,16480,412,4,)

output[3]:
name: 507
valid shape: (1,40,40,64,)
aligned shape: (1,40,40,64,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: SCALE
stride: (409600,10240,256,4,)
scale data: 0.000268988,0.000241197,0.000223859,0.000206904,0.000190969,0.000242727,0.000193009,0.000179623,0.00012404,0.000122957,0.000101731,8.69431e-05,9.3126e-05,9.74604e-05,9.31897e-05,0.000122511,0.000241069,0.000207287,0.000226281,0.000242982,0.000226536,0.000205884,0.000170572,0.000185742,0.000169934,0.000103962,0.000129204,0.000112695,7.21551e-05,7.24738e-05,7.35574e-05,7.98041e-05,0.000271793,0.000265164,0.0002157,0.000238137,0.000212131,0.000183192,0.000191096,0.000138956,0.000138828,0.00011671,0.00010358,0.000121746,0.000128502,0.000108806,0.00011295,0.000142398,0.00023699,0.000229596,0.000211621,0.000240687,0.000239795,0.000191734,0.000235843,0.00016152,0.000185615,0.000115372,0.000102878,0.000123084,0.000118431,9.97551e-05,8.16526e-05,0.000104536,
quantizeAxis: 3

output[4]:
name: 521
valid shape: (1,20,20,103,)
aligned shape: (1,20,20,103,)
aligned byte size: 164800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (164800,8240,412,4,)

output[5]:
name: 529
valid shape: (1,20,20,64,)
aligned shape: (1,20,20,64,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: SCALE
stride: (102400,5120,256,4,)
scale data: 0.000392285,0.000382306,0.000379043,0.000468286,0.000444488,0.000421841,0.000357548,0.000434124,0.000418771,0.00037175,0.000327416,0.000404952,0.000310144,0.000276941,0.000327992,0.000398043,0.00040073,0.000509741,0.000470973,0.000461761,0.000440266,0.000418003,0.000445256,0.000498609,0.00033874,0.000414548,0.000301699,0.000380578,0.000384417,0.000439882,0.000323002,0.000308416,0.000426063,0.000464448,0.00041071,0.000532004,0.000484023,0.000418003,0.00038672,0.000375397,0.000348144,0.000350831,0.000376164,0.000313022,0.00040073,0.0002518,0.000247769,0.000280588,0.000397659,0.000387104,0.000503216,0.000515498,0.000484791,0.000457155,0.000494387,0.000509741,0.000434508,0.000349103,0.000413397,0.000395356,0.000372902,0.000332982,0.00034181,0.00032281,
quantizeAxis: 3


标题要求:标题需要包含基本的信息,以[问题分类][板卡类型][问题简述]的形式填写标题

当一个问题符合多个标签时,也可以提供多个标签

  • [图像算法][RDK X5][编译报错]
  • [语音算法][RDK X3][增加音频输入时长]
  • [语音算法][TROS][大模型][RDK X3 Module][启动异常]

[问题分类]:[多媒体][图像算法][TROS][语音算法][强化学习][大模型][激光雷达][算法工具链][Linux开发][][RDK Studio][RDK Model Zoo][GitHub][... 其他 ...] [板卡类型]:[RDK X3][RDK X3 Module][RDK X5][RDK X5 Module][RDK Ultra][RDK S100][... 其他 ...] 内容要求:rdkos_info信息必须提供,其他信息根据问题类别选择提供

  • 在附件中,提供 sudo rdkos_info 命令返回的结果,保存为 rdkos_info_xxxx.txt,以附件的形式放在帖子下。

详细描述预期结果和程序运行表现,描述与预期不符的地方

参考:https://developer.d-robotics.cc/forumDetail/266442573995170050

rdkos_info_rdkx5.txt

查出问题了,需要用github上的配置文件进行调整,原本的config.json文件用不了了

好的,感谢超哥

系统现在最新的是3.2.3了,可以升级一下

你的模型是103类,不是102

我将workconfig里修改为103了,也在list文件中补上了缺失的那一个类,还是报段错误,是哪里也需要修改吗

同样问题,请问一下github配置文件的链接是什么