Boxs基础算法 FCOS目标检测算法示例订阅sensor package发布的图片,经过算法推理后发布hobot AI msg,通过websocket package实现在PC端浏览器上渲染显示sensor发布的图片和对应的AI结果。
使用USB摄像头发布图片
# 配置TogetherROS环境-
source /opt/tros/setup.bash-
# 配置USB摄像头-
export CAM_TYPE=usb-
# 启动launch文件-
ros2 launch dnn_node_example hobot_dnn_node_example.launch.py config_file:=config/fcosworkconfig.json image_width:=480 image_height:=272,实现在PC端浏览器上渲染显示sensor发布的图片,说明了摄像头与旭日X3的通信的好的
目前的_TogetherROS 版本是_
root@ubuntu:~# sudo apt list | grep hhp
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
hhp-verify/unknown,now 1.0.0 arm64 [installed,automatic]
hhp/unknown,now 1.0.5 arm64 [installed]
##########################################################################################################################退出上面的FCOS目标检测算法示例后在运行人体检测和跟踪 使用USB摄像头发布图片,使用如下的命令
# 配置TogetherROS环境-
source /opt/tros/setup.bash-
# 从TogetherROS的安装路径中拷贝出运行示例需要的配置文件。-
cp -r /opt/tros/lib/mono2d_body_detection/config/ .-
# 配置USB摄像头-
export CAM_TYPE=usb-
# 启动launch文件-
ros2 launch mono2d_body_detection hobot_mono2d_body_detection.launch.py
输出信息好的,但是在PC端的浏览器输入http://IP 后无画面输出
root@ubuntu:~# source /opt/tros/setup.bash
root@ubuntu:~# cp -r /opt/tros/lib/mono2d_body_detection/config/ .
root@ubuntu:~# export CAM_TYPE=usb
root@ubuntu:~# ros2 launch mono2d_body_detection hobot_mono2d_body_detection.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-09-04-09-36-54-763570-ubuntu-13705
[INFO] [launch]: Default logging verbosity is set to INFO
camera_type is usb
using usb cam
webserver has launch
[INFO] [hobot_usb_cam-1]: process started with pid [13730]
[INFO] [hobot_codec_republish-2]: process started with pid [13732]
[INFO] [mono2d_body_detection-3]: process started with pid [13734]
[INFO] [websocket-4]: process started with pid [13736]
[mono2d_body_detection-3] [WARN] [1662255415.231307294] [example]: This is mono2d body det example!
[mono2d_body_detection-3] [WARN] [1662255415.396168187] [mono2d_body_det]: Parameter:
[mono2d_body_detection-3] is_sync_mode_: 0
[mono2d_body_detection-3] model_file_name_: config/multitask_body_head_face_hand_kps_960x544.hbm
[mono2d_body_detection-3] is_shared_mem_sub: 1
[mono2d_body_detection-3] ai_msg_pub_topic_name: /hobot_mono2d_body_detection
[mono2d_body_detection-3] [BPU_PLAT]BPU Platform Version(1.3.1)!
[mono2d_body_detection-3] [C][13734][09-04][09:36:55:402][configuration.cpp:49][EasyDNN]EasyDNN version: 0.4.11
[mono2d_body_detection-3] [HBRT] set log level as 0. version = 3.14.5
[mono2d_body_detection-3] [DNN] Runtime version = 1.9.7_(3.14.5 HBRT)
[mono2d_body_detection-3] [WARN] [1662255415.529054269] [mono2d_body_det]: Create hbmem_subscription with topic_name: /hbmem_img
[mono2d_body_detection-3] (MOTMethod.cpp:34): MOTMethod::Init config/iou2_euclid_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (IOU2.cpp:29): IOU2 Mot::Init config/iou2_euclid_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (MOTMethod.cpp:34): MOTMethod::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (IOU2.cpp:29): IOU2 Mot::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (MOTMethod.cpp:34): MOTMethod::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (IOU2.cpp:29): IOU2 Mot::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (MOTMethod.cpp:34): MOTMethod::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] (IOU2.cpp:29): IOU2 Mot::Init config/iou2_method_param.json
[mono2d_body_detection-3]
[mono2d_body_detection-3] [WARN] [1662255417.186000511] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.193967633] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.203603384] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.211939479] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.223609580] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.232364395] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.244880767] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.252839515] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.264514324] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.272961120] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.285066188] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.292433314] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.304698371] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.312309186] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.324408131] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.332167644] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.344043063] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.351983437] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.364284325] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.372096084] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.384635579] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.392529916] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.404577114] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.412513197] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.424381200] [dnn]: Task Size: 10 exceeds limit: 10
[mono2d_body_detection-3] [WARN] [1662255417.436165334] [dnn]: Task Size: 10 exceeds limit: 10