跑用户手册中的使用USB摄像头发布图片时报错

root@ubuntu:/app/pydev_demo/02_usb_camera_sample# ros2 launch dnn_node_example dnn_node_example.launch.py dnn_example_config_file:=config/yolov2workconfig.json dnn_example_image_width:=480 dnn_example_image_height:=272

[INFO] [launch]: All log files can be found below /root/.ros/log/2023-07-06-14-46-22-825879-ubuntu-65240

[INFO] [launch]: Default logging verbosity is set to INFO

dnn_node_example_path is /opt/tros/lib/dnn_node_example

cp_cmd is cp -r /opt/tros/lib/dnn_node_example/config .

camera_type is usb

using usb cam

webserver has launch

[INFO] [hobot_usb_cam-1]: process started with pid [65246]

[INFO] [hobot_codec_republish-2]: process started with pid [65248]

[INFO] [example-3]: process started with pid [65250]

[INFO] [websocket-4]: process started with pid [65253]

[example-3] [WARN] [1688625983.363084479] [example]: This is dnn node example!

[hobot_usb_cam-1] [ERROR] [1688625983.398267946] [hobot_usb_cam]: Camera calibration file: /opt/tros/lib/hobot_usb_cam/config/usb_camera_calibration.yaml does not exist! Please make sure the calibration file path is correct and the calibration file exists!

[example-3] [WARN] [1688625983.586835383] [example]: 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: config/yolov2workconfig.json

[example-3] msg_pub_topic_name_: hobot_dnn_detection

[example-3] [WARN] [1688625983.588172224] [example]: Parameter:

[example-3] model_file_name: /opt/hobot/model/x3/basic/yolov2_608x608_nv12.bin

[example-3] model_name: yolov2_608x608_nv12

[example-3] [WARN] [1688625983.588337751] [example]: model_file_name_: /opt/hobot/model/x3/basic/yolov2_608x608_nv12.bin, task_num: 4

[example-3] [EasyDNN]: EasyDNN version = 1.6.1_(1.18.4 DNN)

[example-3] [BPU_PLAT]BPU Platform Version(1.3.3)!

[example-3] [HBRT] set log level as 0. version = 3.15.25.0

[example-3] [DNN] Runtime version = 1.18.4_(3.15.25 HBRT)

[example-3] [A][DNN][packed_model.cpp:234][Model](2023-07-06,14:46:25.460.230) [HorizonRT] The model builder version = 1.6.8

[example-3] [E][65250][07-06][14:46:26:077][model.cpp:171][example][EasyDNN] -969698384 out if range[0, 1)

[example-3] [WARN] [1688625986.078103162] [dnn]: Run default SetOutputParser.

[example-3] [WARN] [1688625986.078428634] [dnn]: Set output parser with default dnn node parser, you will get all output tensors and should parse output_tensors in PostProcess.

[ERROR] [example-3]: process has died [pid 65250, exit code -11, cmd ‘/opt/tros/lib/dnn_node_example/example --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_ft7b8uz8 --params-file /tmp/launch_params_j0rygvps --params-file /tmp/launch_params_ego3_yr5 --params-file /tmp/launch_params_j8v6jq1e --params-file /tmp/launch_params_rvo2bpa1’].

[websocket-4] [ERROR] [1688625988.548714981] [websocket]: Websocket did not receive AI data! Please check whether the AI data publisher still exists by ‘ros2 topic info hobot_dnn_detection’!

[websocket-4] [ERROR] [1688625993.548199654] [websocket]: Websocket did not receive AI data! Please check whether the AI data publisher still exists by ‘ros2 topic info hobot_dnn_detection’!

^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

[INFO] [websocket-4]: process has finished cleanly [pid 65253]

[INFO] [hobot_codec_republish-2]: process has finished cleanly [pid 65248]

[INFO] [hobot_usb_cam-1]: process has finished cleanly [pid 65246]

回灌的示例能跑起来吗?

也是一样的错

root@ubuntu:~# ros2 launch dnn_node_example dnn_node_example_feedback.launch.py dnn_example_config_file:=config/yolov2workconfig.json dnn_example_image:=config/target.jpg

[INFO] [launch]: All log files can be found below /root/.ros/log/2023-07-07-22-48-11-069966-ubuntu-4253

[INFO] [launch]: Default logging verbosity is set to INFO

dnn_node_example_path is /opt/tros/lib/dnn_node_example

cp_cmd is cp -r /opt/tros/lib/dnn_node_example/config .

[INFO] [example-1]: process started with pid [4512]

[example-1] [WARN] [1688871010.648676601] [example]: This is dnn node example!

[example-1] [WARN] [1688871010.965788102] [example]: Parameter:

[example-1] feed_type(0:local, 1:sub): 0

[example-1] image: config/target.jpg

[example-1] image_type: 0

[example-1] dump_render_img: 1

[example-1] is_shared_mem_sub: 0

[example-1] config_file: config/yolov2workconfig.json

[example-1] msg_pub_topic_name_: hobot_dnn_detection

[example-1] [WARN] [1688871010.967020477] [example]: Parameter:

[example-1] model_file_name: /opt/hobot/model/x3/basic/yolov2_608x608_nv12.bin

[example-1] model_name: yolov2_608x608_nv12

[example-1] [INFO] [1688871010.967178727] [dnn]: Node init.

[example-1] [INFO] [1688871010.967230643] [example]: Set node para.

[example-1] [WARN] [1688871010.967270518] [example]: model_file_name_: /opt/hobot/model/x3/basic/yolov2_608x608_nv12.bin, task_num: 4

[example-1] [INFO] [1688871010.967340018] [dnn]: Model init.

[example-1] [EasyDNN]: EasyDNN version = 1.6.1_(1.18.4 DNN)

[example-1] [BPU_PLAT]BPU Platform Version(1.3.3)!

[example-1] [HBRT] set log level as 0. version = 3.15.25.0

[example-1] [DNN] Runtime version = 1.18.4_(3.15.25 HBRT)

[example-1] [A][DNN][packed_model.cpp:234][Model](2023-07-09,10:50:13.740.713) [HorizonRT] The model builder version = 1.6.8

[example-1] [INFO] [1688871014.395556937] [dnn]: The model input 0 width is 85 and height is 1495040600

[example-1] [E][4512][07-09][10:50:14:395][model.cpp:171][example][EasyDNN] -934669888 out if range[0, 1)

[example-1] [WARN] [1688871014.395719478] [dnn]: Run default SetOutputParser.

[example-1] [WARN] [1688871014.395789228] [dnn]: Set output parser with default dnn node parser, you will get all output tensors and should parse output_tensors in PostProcess.

[example-1] [INFO] [1688871014.395834187] [dnn impl]: Set default output parser

[ERROR] [example-1]: process has died [pid 4512, exit code -11, cmd ‘/opt/tros/lib/dnn_node_example/example --ros-args --log-level info --ros-args --params-file /tmp/launch_params_f603kokf --params-file /tmp/launch_params_o3fmqqwg --params-file /tmp/launch_params_h6u3iwns --params-file /tmp/launch_params_f0t_3jp7 --params-file /tmp/launch_params_otdgsag9’].

root@ubuntu:~#

查下dnn安装包的版本号:apt show hobot-dnn,如果不是下面的版本号,需要升级下。

hobot-dnn_2.0.0-20230530181103_arm64.deb           30-May-2023 10:20             9265380

这种直接退出没有有用错误信息的问题一般是环境导致,看下系统版本和tros的版本分别是多少。

这是tros版本

root@ubuntu:~# apt show tros

Package: tros

Version: 2.0.0-20230523223852

Status: install ok installed

Maintainer: kairui.wang kairui.wang@horizon.ai

Installed-Size: unknown

Depends: hobot-models-basic, tros-ros-base, tros-ai-msgs, tros-audio-control, tros-audio-msg, tros-audio-tracking, tros-body-tracking, tros-dnn-benchmark-example, tros-dnn-node, tros-dnn-node-example, tros-dnn-node-sample, tros-elevation-net, tros-gesture-control, tros-hand-gesture-detection, tros-hand-lmk-detection, tros-hbm-img-msgs, tros-hobot-app-xrrobot-body-tracking, tros-hobot-app-xrrobot-gesture-control, tros-hobot-codec, tros-hobot-cv, tros-hobot-falldown-detection, tros-hobot-hdmi, tros-hobot-image-publisher, tros-hobot-mot, tros-hobot-usb-cam, tros-image-subscribe-example, tros-img-msgs, tros-imu-sensor, tros-line-follower-model, tros-line-follower-perception, tros-mipi-cam, tros-mono2d-body-detection, tros-mono2d-trash-detection, tros-mono3d-indoor-detection, tros-parking-perception, tros-parking-search, tros-rgbd-sensor, tros-websocket, tros-xrrobot, tros-xrrobot-msgs

Download-Size: unknown

APT-Manual-Installed: yes

APT-Sources: /var/lib/dpkg/status

Description: TogetheROS Bot

root@ubuntu:~#

这是系统版本root@ubuntu:~# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 20.04.6 LTS

Release: 20.04

Codename: focal

root@ubuntu:~# cat /etc/issue

Ubuntu 20.04.6 LTS \n \l

root@ubuntu:~#

系统我是烧的beta里面的

2.0.0的server版本镜像名是ubuntu-preinstalled-server-arm64.img地址是http://archive.sunrisepi.tech/downloads/os\_images/2.0.0/beta/