UNPKG

node-red-node-rdk-tools

Version:

配合RDK硬件及TROS使用的Node-RED功能包(Node-RED nodes for using TROS on a RDK hardware and TROS)

533 lines 12.8 kB
[ { "id": "yolov8_seg_photo_tab", "type": "tab", "label": "TROS YOLOv8_Seg_Photo", "disabled": false, "info": "", "env": [] }, { "id": "4785f85ce425cdda", "type": "group", "z": "yolov8_seg_photo_tab", "name": "核心控制和运行", "style": { "fill": "#e3f3d3", "label": true, "fill-opacity": "0.5" }, "nodes": [ "exec_usb_video", "exec_mipi_video", "exec_stop_all" ], "x": 294, "y": 111.5, "w": 232, "h": 217 }, { "id": "ba7162a49e22e7db", "type": "group", "z": "yolov8_seg_photo_tab", "name": "结果可视化", "style": { "fill": "#bfdbef", "fill-opacity": "0.47", "label": true }, "nodes": [ "919aa41557c558fd", "986167a13e3302b0", "263f9ebd363d3fca" ], "x": 294, "y": 359, "w": 372, "h": 129.5 }, { "id": "inject_usb_video", "type": "inject", "z": "yolov8_seg_photo_tab", "name": "启动(USB摄像头)", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "usb_video", "payload": "start", "payloadType": "str", "x": 150, "y": 180, "wires": [ [ "exec_usb_video", "919aa41557c558fd" ] ] }, { "id": "exec_usb_video", "type": "exec", "z": "yolov8_seg_photo_tab", "g": "4785f85ce425cdda", "command": "source /opt/tros/humble/setup.bash && export CAM_TYPE=usb && ros2 launch dnn_node_example dnn_node_example.launch.py dnn_example_dump_render_img:=0 dnn_example_config_file:=config/yolov8segworkconfig.json dnn_example_image_width:=1920 dnn_example_image_height:=1080", "addpay": false, "append": "", "useSpawn": true, "timer": "120", "oldrc": false, "name": "USB视频流启动器", "x": 410, "y": 160, "wires": [ [ "3c8b057dc821b5b4" ], [ "11c991a294da7c8e" ], [] ] }, { "id": "inject_mipi_video", "type": "inject", "z": "yolov8_seg_photo_tab", "name": "启动(MIPI摄像头)", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "mipi_video", "payload": "start", "payloadType": "str", "x": 150, "y": 220, "wires": [ [ "exec_mipi_video", "919aa41557c558fd" ] ] }, { "id": "exec_mipi_video", "type": "exec", "z": "yolov8_seg_photo_tab", "g": "4785f85ce425cdda", "command": "source /opt/tros/humble/setup.bash && export CAM_TYPE=mipi && ros2 launch dnn_node_example dnn_node_example.launch.py dnn_example_dump_render_img:=0 dnn_example_config_file:=config/yolov8segworkconfig.json dnn_example_image_width:=1920 dnn_example_image_height:=1080", "addpay": false, "append": "", "useSpawn": true, "timer": "120", "oldrc": false, "name": "MIPI视频流启动器", "x": 410, "y": 220, "wires": [ [ "28af4ce01b0c7ab1" ], [ "14246d604391f17e" ], [] ] }, { "id": "inject_browser", "type": "inject", "z": "yolov8_seg_photo_tab", "name": "打开可视化页面", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "http://{host}:8000", "payloadType": "str", "x": 140, "y": 520, "wires": [ [ "openurl_browser" ] ] }, { "id": "openurl_browser", "type": "rdk-tools openurl", "z": "yolov8_seg_photo_tab", "name": "", "x": 320, "y": 520, "wires": [] }, { "id": "inject_stop", "type": "inject", "z": "yolov8_seg_photo_tab", "name": "关闭", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "", "topic": "", "payload": "stop", "payloadType": "str", "x": 110, "y": 260, "wires": [ [ "exec_stop_all" ] ] }, { "id": "exec_stop_all", "type": "exec", "z": "yolov8_seg_photo_tab", "g": "4785f85ce425cdda", "command": "sudo pkill -2 -f ros; sleep 3;", "addpay": false, "append": "", "useSpawn": "false", "timer": "10", "winHide": false, "oldrc": false, "name": "停止服务", "x": 380, "y": 280, "wires": [ [], [], [] ] }, { "id": "e4b627ff6724aad8", "type": "comment", "z": "yolov8_seg_photo_tab", "name": "名称:TROS图像分割 Ultralytics YOLOv8-Seg", "info": "", "x": 190, "y": 40, "wires": [] }, { "id": "83544730438b8bed", "type": "inject", "z": "yolov8_seg_photo_tab", "name": "了解更多", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "https://developer.d-robotics.cc/rdk_doc/rdk_s/Robot_development/boxs/segmentation/yolov8_seg", "payloadType": "str", "x": 460, "y": 40, "wires": [ [ "856ff199419c15de" ] ] }, { "id": "856ff199419c15de", "type": "rdk-tools openurl", "z": "yolov8_seg_photo_tab", "name": "", "x": 640, "y": 40, "wires": [] }, { "id": "28af4ce01b0c7ab1", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "正确执行提示", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 660, "y": 200, "wires": [] }, { "id": "14246d604391f17e", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "错误执行提示", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 660, "y": 240, "wires": [] }, { "id": "3c8b057dc821b5b4", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "正确执行提示", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 660, "y": 120, "wires": [] }, { "id": "11c991a294da7c8e", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "错误执行提示", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 660, "y": 160, "wires": [] }, { "id": "55c189fb57ede7c5", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "算法结果输出", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 780, "y": 400, "wires": [] }, { "id": "fb583a67a5aa75f4", "type": "debug", "z": "yolov8_seg_photo_tab", "name": "性能信息输出", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 780, "y": 440, "wires": [] }, { "id": "919aa41557c558fd", "type": "delay", "z": "yolov8_seg_photo_tab", "g": "ba7162a49e22e7db", "name": "", "pauseType": "delay", "timeout": "5", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 380, "y": 400, "wires": [ [ "986167a13e3302b0" ] ] }, { "id": "986167a13e3302b0", "type": "change", "z": "yolov8_seg_photo_tab", "g": "ba7162a49e22e7db", "name": "设定链接", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "ws://${host}:8080", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 380, "y": 440, "wires": [ [ "263f9ebd363d3fca" ] ] }, { "id": "263f9ebd363d3fca", "type": "rdk-tools videows", "z": "yolov8_seg_photo_tab", "g": "ba7162a49e22e7db", "name": "视频预览", "fps": "4", "width": "320", "active": true, "x": 560, "y": 440, "wires": [ [ "55c189fb57ede7c5", "ac094272b1a1f44f" ], [ "fb583a67a5aa75f4" ], [] ] }, { "id": "3fc6feefc280a417", "type": "comment", "z": "yolov8_seg_photo_tab", "name": "注意:选择对应的摄像头类型", "info": "", "x": 140, "y": 140, "wires": [] }, { "id": "8b77e4b694c90bb8", "type": "comment", "z": "yolov8_seg_photo_tab", "name": "注意:使用结束后请主动关闭", "info": "", "x": 140, "y": 300, "wires": [] }, { "id": "ac094272b1a1f44f", "type": "change", "z": "yolov8_seg_photo_tab", "name": "提取类型", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "attributes.type", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 380, "y": 580, "wires": [ [ "bb70f57c37355d53" ] ] }, { "id": "bb70f57c37355d53", "type": "rdk-tools output", "z": "yolov8_seg_photo_tab", "name": "", "active": true, "x": 380, "y": 620, "wires": [] }, { "id": "2d5df9df021c1d6a", "type": "global-config", "env": [], "modules": { "node-red-node-rdk-tools": "0.0.27" } } ]