node-red-node-rdk-3dsim
Version:
配合RDK硬件使用的3D可视化功能包
1,052 lines • 23.9 kB
JSON
[
{
"id": "23061a35c7794c08",
"type": "tab",
"label": "TROS Gesture Detection (Application)",
"disabled": false,
"info": "",
"env": []
},
{
"id": "27893025aa91c2a2",
"type": "group",
"z": "23061a35c7794c08",
"name": "软件包智能更新",
"style": {
"fill": "#ffffbf",
"fill-opacity": "0.46",
"label": true
},
"nodes": [
"a8530c32a57a5217",
"d1e5c91f4aca552c",
"309bf26deb0d8c8a"
],
"x": 334,
"y": 79,
"w": 572,
"h": 82
},
{
"id": "4cc5cc61baa74e3f",
"type": "group",
"z": "23061a35c7794c08",
"name": "检测及运行Gesture节点",
"style": {
"fill": "#e3f3d3",
"fill-opacity": "0.5",
"label": true
},
"nodes": [
"c464500550671c5c",
"6228b606fd287f3a"
],
"x": 354,
"y": 199,
"w": 412,
"h": 82
},
{
"id": "9d27a41302ec1764",
"type": "group",
"z": "23061a35c7794c08",
"name": "Gesture结果展示",
"style": {
"fill": "#bfdbef",
"fill-opacity": "0.47",
"label": true
},
"nodes": [
"e1a1a817ada793be",
"fb707f9ff205afa3",
"2b8daf8d30f55998"
],
"x": 134,
"y": 319,
"w": 372,
"h": 122
},
{
"id": "1b8d2e66c36cc3ed",
"type": "comment",
"z": "23061a35c7794c08",
"name": "名称:TROS应用 手势识别",
"info": "",
"x": 170,
"y": 40,
"wires": []
},
{
"id": "1a270d021221098f",
"type": "inject",
"z": "23061a35c7794c08",
"name": "了解更多",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "https://developer.d-robotics.cc/rdk_doc/Robot_development/boxs/function/hand_gesture_detection",
"payloadType": "str",
"x": 400,
"y": 40,
"wires": [
[
"46588d76b50e4888"
]
]
},
{
"id": "46588d76b50e4888",
"type": "rdk-tools openurl",
"z": "23061a35c7794c08",
"name": "",
"x": 560,
"y": 40,
"wires": []
},
{
"id": "19a9321d64871010",
"type": "comment",
"z": "23061a35c7794c08",
"name": "注意:选择对应的摄像头类型",
"info": "",
"x": 220,
"y": 200,
"wires": []
},
{
"id": "1198a93a76be4d25",
"type": "inject",
"z": "23061a35c7794c08",
"name": "启动(USB摄像头)",
"props": [
{
"p": "payload"
},
{
"p": "camera",
"v": "usb",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "iso",
"payloadType": "date",
"x": 190,
"y": 120,
"wires": [
[
"c464500550671c5c",
"e1a1a817ada793be"
]
]
},
{
"id": "4853b2c410708c58",
"type": "inject",
"z": "23061a35c7794c08",
"name": "启动(MIPI摄像头)",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "mipi",
"payload": "iso",
"payloadType": "date",
"x": 190,
"y": 160,
"wires": [
[
"c464500550671c5c",
"e1a1a817ada793be"
]
]
},
{
"id": "cc126a6dbd098ac5",
"type": "inject",
"z": "23061a35c7794c08",
"name": "关闭",
"props": [
{
"p": "kill",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 150,
"y": 240,
"wires": [
[
"6228b606fd287f3a"
]
]
},
{
"id": "cbd3b3e43506b099",
"type": "comment",
"z": "23061a35c7794c08",
"name": "注意:使用结束后请主动关闭",
"info": "",
"x": 220,
"y": 280,
"wires": []
},
{
"id": "a8530c32a57a5217",
"type": "rdk-tools smartupdate",
"z": "23061a35c7794c08",
"g": "27893025aa91c2a2",
"name": "",
"x": 420,
"y": 120,
"wires": [
[
"d1e5c91f4aca552c"
],
[]
]
},
{
"id": "d1e5c91f4aca552c",
"type": "change",
"z": "23061a35c7794c08",
"g": "27893025aa91c2a2",
"name": "更新提示",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "智能更新已完成",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 600,
"y": 120,
"wires": [
[
"309bf26deb0d8c8a"
]
]
},
{
"id": "309bf26deb0d8c8a",
"type": "rdk-tools texttoaudio",
"z": "23061a35c7794c08",
"g": "27893025aa91c2a2",
"name": "",
"x": 810,
"y": 120,
"wires": []
},
{
"id": "c464500550671c5c",
"type": "change",
"z": "23061a35c7794c08",
"g": "4cc5cc61baa74e3f",
"name": "设定Gesture节点",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "launch",
"pt": "msg",
"to": "hand_gesture_detection hand_gesture_detection.launch.py",
"tot": "str"
},
{
"t": "set",
"p": "insert",
"pt": "msg",
"to": "$join(['export CAM_TYPE=', msg.camera, ' && cp -r /opt/tros/${TROS_DISTRO}/lib/mono2d_body_detection/config/ .', ' && cp -r /opt/tros/${TROS_DISTRO}/lib/hand_lmk_detection/config/ .', ' && cp -r /opt/tros/${TROS_DISTRO}/lib/hand_gesture_detection/config/ .'])",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 470,
"y": 240,
"wires": [
[
"6228b606fd287f3a"
]
]
},
{
"id": "6228b606fd287f3a",
"type": "rdk-tools checkexecute",
"z": "23061a35c7794c08",
"g": "4cc5cc61baa74e3f",
"name": "",
"x": 670,
"y": 240,
"wires": [
[
"ea8ecd01f9e7f53e"
],
[
"030b65f1eacd0294"
]
]
},
{
"id": "ea8ecd01f9e7f53e",
"type": "debug",
"z": "23061a35c7794c08",
"name": "正确执行提示",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 220,
"wires": []
},
{
"id": "030b65f1eacd0294",
"type": "debug",
"z": "23061a35c7794c08",
"name": "错误执行提示",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 260,
"wires": []
},
{
"id": "60efbddf407e4957",
"type": "debug",
"z": "23061a35c7794c08",
"name": "算法结果输出",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 660,
"y": 360,
"wires": []
},
{
"id": "32fe93b91909de2f",
"type": "debug",
"z": "23061a35c7794c08",
"name": "性能信息输出",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 660,
"y": 400,
"wires": []
},
{
"id": "e1a1a817ada793be",
"type": "delay",
"z": "23061a35c7794c08",
"g": "9d27a41302ec1764",
"name": "",
"pauseType": "delay",
"timeout": "12",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 220,
"y": 360,
"wires": [
[
"fb707f9ff205afa3"
]
]
},
{
"id": "fb707f9ff205afa3",
"type": "change",
"z": "23061a35c7794c08",
"g": "9d27a41302ec1764",
"name": "设定链接",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "ws://{host}:8080",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 220,
"y": 400,
"wires": [
[
"2b8daf8d30f55998"
]
]
},
{
"id": "2b8daf8d30f55998",
"type": "rdk-tools videows",
"z": "23061a35c7794c08",
"g": "9d27a41302ec1764",
"name": "",
"fps": "3",
"width": 640,
"active": true,
"x": 400,
"y": 380,
"wires": [
[
"60efbddf407e4957",
"e450a64144d61776"
],
[
"32fe93b91909de2f"
],
[]
]
},
{
"id": "ea0d6f0dedb07b54",
"type": "inject",
"z": "23061a35c7794c08",
"name": "更新软件包",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 80,
"wires": [
[
"a8530c32a57a5217"
]
]
},
{
"id": "b0f032ffad30d858",
"type": "inject",
"z": "23061a35c7794c08",
"name": "打开可视化页面",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "http://{host}:8000",
"payloadType": "str",
"x": 620,
"y": 320,
"wires": [
[
"ee39686c51cc2a15"
]
]
},
{
"id": "ee39686c51cc2a15",
"type": "rdk-tools openurl",
"z": "23061a35c7794c08",
"name": "",
"x": 820,
"y": 320,
"wires": []
},
{
"id": "e450a64144d61776",
"type": "switch",
"z": "23061a35c7794c08",
"name": "过滤出“手”",
"property": "attributes.type",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "hand",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 210,
"y": 500,
"wires": [
[
"b995328e76d1cb7b"
]
]
},
{
"id": "b995328e76d1cb7b",
"type": "switch",
"z": "23061a35c7794c08",
"name": "过滤出手势",
"property": "attributes.attributes.length",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "0",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 210,
"y": 540,
"wires": [
[
"bfa0e71e690abbfd"
]
]
},
{
"id": "bfa0e71e690abbfd",
"type": "switch",
"z": "23061a35c7794c08",
"name": "过滤手势类别",
"property": "attributes.attributes[0].type",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "gesture",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 220,
"y": 580,
"wires": [
[
"9b79a74ba29e2d43"
]
]
},
{
"id": "9b79a74ba29e2d43",
"type": "change",
"z": "23061a35c7794c08",
"name": "提取手势类别",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "attributes.attributes[0].value",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 220,
"y": 620,
"wires": [
[
"4053517b20413f65",
"dd6ea0473601d8e7"
]
]
},
{
"id": "ba6479e7065685e0",
"type": "switch",
"z": "23061a35c7794c08",
"name": "分离手势",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Victory",
"vt": "str"
},
{
"t": "eq",
"v": "Palm",
"vt": "str"
},
{
"t": "eq",
"v": "Awesome",
"vt": "str"
},
{
"t": "eq",
"v": "Thumb Up",
"vt": "str"
},
{
"t": "eq",
"v": "ThumbLeft",
"vt": "str"
},
{
"t": "eq",
"v": "ThumbRight",
"vt": "str"
},
{
"t": "eq",
"v": "Okay",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 7,
"x": 400,
"y": 940,
"wires": [
[
"cb2c0bb1df5fd1e0",
"a95e864d75fd4a82"
],
[
"cb2c0bb1df5fd1e0",
"ca4a98ded27aa53b"
],
[],
[
"cb2c0bb1df5fd1e0",
"cb0252536c8039b9"
],
[
"cb2c0bb1df5fd1e0"
],
[
"cb2c0bb1df5fd1e0",
"59a59cbdd0477ec7"
],
[
"cb2c0bb1df5fd1e0",
"aa87788c70688291"
]
]
},
{
"id": "7ed4d4537326d029",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势1: 胜利",
"info": "",
"x": 210,
"y": 840,
"wires": []
},
{
"id": "dbb90d76801b7b52",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势2: 手掌",
"info": "",
"x": 210,
"y": 880,
"wires": []
},
{
"id": "11c49ffaf20ccf1f",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势3: 好极了",
"info": "",
"x": 210,
"y": 920,
"wires": []
},
{
"id": "53a0f0c654467dcf",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势4: 大拇指向上",
"info": "",
"x": 230,
"y": 960,
"wires": []
},
{
"id": "a665e92bd257d9db",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势5: 大拇指向左",
"info": "",
"x": 230,
"y": 1000,
"wires": []
},
{
"id": "16f35d8b04b808d8",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势6: 大拇指向右",
"info": "",
"x": 230,
"y": 1040,
"wires": []
},
{
"id": "2fda307060acde4b",
"type": "comment",
"z": "23061a35c7794c08",
"name": "手势7: OK",
"info": "",
"x": 200,
"y": 1080,
"wires": []
},
{
"id": "cb2c0bb1df5fd1e0",
"type": "rbe",
"z": "23061a35c7794c08",
"name": "过滤相同手势",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 580,
"y": 1040,
"wires": [
[
"e8a01324d3085fd6"
]
]
},
{
"id": "e8a01324d3085fd6",
"type": "rdk-tools texttoaudio",
"z": "23061a35c7794c08",
"name": "",
"x": 590,
"y": 1080,
"wires": []
},
{
"id": "4053517b20413f65",
"type": "rdk-tools output",
"z": "23061a35c7794c08",
"name": "",
"active": true,
"x": 210,
"y": 660,
"wires": []
},
{
"id": "dd6ea0473601d8e7",
"type": "rbe",
"z": "23061a35c7794c08",
"name": "过滤相同手势",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 860,
"wires": [
[
"ba6479e7065685e0"
]
]
},
{
"id": "a95e864d75fd4a82",
"type": "change",
"z": "23061a35c7794c08",
"name": "走路",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Walking",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 860,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "7bb35101ce065aa8",
"type": "change",
"z": "23061a35c7794c08",
"name": "停止",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Idle",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 900,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "ca4a98ded27aa53b",
"type": "change",
"z": "23061a35c7794c08",
"name": "跑步",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Running",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 940,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "cb0252536c8039b9",
"type": "change",
"z": "23061a35c7794c08",
"name": "跳舞",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Dance",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 980,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "aa87788c70688291",
"type": "change",
"z": "23061a35c7794c08",
"name": "装死",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Death",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 1020,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "59a59cbdd0477ec7",
"type": "change",
"z": "23061a35c7794c08",
"name": "坐下",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Sitting",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 1060,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "d33fe5373d1a599f",
"type": "change",
"z": "23061a35c7794c08",
"name": "站立",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Standing",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 1100,
"wires": [
[
"11e72ef330c4c8b2"
]
]
},
{
"id": "11e72ef330c4c8b2",
"type": "rdk-3d 3drobot",
"z": "23061a35c7794c08",
"name": "",
"x": 1120,
"y": 380,
"wires": []
}
]