@droneblocks/node-red-dexi
Version:
You want to make sure you don't lose any of your flow development. Make sure to map the host "flows" directory to the container directory as shown below. This will store the flow on your host machine if/when the container is destroyed.
2,169 lines • 139 kB
JSON
[
{
"id": "78ed20307a6c3fca",
"type": "tab",
"label": "LED Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "01d54c8eebdb2b6e",
"type": "tab",
"label": "Blink LED Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "5f5d6abf64fbf1a2",
"type": "tab",
"label": "April Tag Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "8c88ec5f6bf1919d",
"type": "tab",
"label": "YOLO Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "d94edfc7200152be",
"type": "tab",
"label": "PX4 Telemetry",
"disabled": true,
"info": "",
"env": []
},
{
"id": "a691db1a9e113a84",
"type": "tab",
"label": "PX4 Arm, Takeoff, and Land",
"disabled": true,
"info": "",
"env": []
},
{
"id": "3f767aee767c6d1c",
"type": "tab",
"label": "DEXI Offboard Manager",
"disabled": true,
"info": "",
"env": []
},
{
"id": "e768c19cc0da9678",
"type": "tab",
"label": "PX4 Raw Offboard Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "6fe657fb81fc95dd",
"type": "tab",
"label": "AVR 2024 Mission 1",
"disabled": true,
"info": "",
"env": []
},
{
"id": "8c0ec1ac3b0c99c6",
"type": "tab",
"label": "Laser Demo",
"disabled": true,
"info": "",
"env": []
},
{
"id": "2131ca674bcfee95",
"type": "tab",
"label": "Video iframe",
"disabled": true,
"info": "",
"env": []
},
{
"id": "ad6fab15d3c693a6",
"type": "tab",
"label": "Pi Camera Subscriber",
"disabled": true,
"info": "",
"env": []
},
{
"id": "0ec8cb42ee99a00d",
"type": "tab",
"label": "Compute Kit Servo Control",
"disabled": true,
"info": "",
"env": []
},
{
"id": "142bd2ed15f43c13",
"type": "tab",
"label": "Compute Kit GPIO",
"disabled": true,
"info": "",
"env": []
},
{
"id": "e9b2c26d123cc246",
"type": "tab",
"label": "Compute Kit Open Collector (Laser Pulse)",
"disabled": true,
"info": "",
"env": []
},
{
"id": "27129f80a96ce509",
"type": "ros2-websocket-server",
"url": "${ROS2_WEBSOCKET_URL}"
},
{
"id": "5788a4cce510d440",
"type": "ui_base",
"theme": {
"name": "theme-light",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#0094CE",
"value": "#0094CE",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#0094CE",
"edited": false
},
"page-backgroundColor": {
"value": "#fafafa",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"group-textColor": {
"value": "#1bbfff",
"edited": false
},
"group-borderColor": {
"value": "#ffffff",
"edited": false
},
"group-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"widget-textColor": {
"value": "#111111",
"edited": false
},
"widget-backgroundColor": {
"value": "#0094ce",
"edited": false
},
"widget-borderColor": {
"value": "#ffffff",
"edited": false
},
"base-font": {
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey",
"palette": "light"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "true",
"dateFormat": "DD/MM/YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
},
{
"id": "2ee38794734c2d27",
"type": "ui_tab",
"name": "AVR Mission 1",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
},
{
"id": "4166ed8cf4b1e7d4",
"type": "ui_group",
"name": "Main",
"tab": "2ee38794734c2d27",
"order": 1,
"disp": true,
"width": 12,
"collapse": false,
"className": ""
},
{
"id": "8925e2a4ea9f1164",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 2,
"width": 3,
"height": 1
},
{
"id": "abe39b768890b435",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 4,
"width": 3,
"height": 1
},
{
"id": "e6eba801bf9dd9d2",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 5,
"width": 3,
"height": 1
},
{
"id": "95cc5720a331dc0c",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 6,
"width": 3,
"height": 1
},
{
"id": "ee9a745fa0a0d671",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 7,
"width": 3,
"height": 1
},
{
"id": "76c130a2b7ab488e",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 8,
"width": 3,
"height": 1
},
{
"id": "0acdc4fa5cc98536",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 9,
"width": 3,
"height": 1
},
{
"id": "270b6da83bfd6649",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 10,
"width": 3,
"height": 1
},
{
"id": "95cc3655525f2ec9",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 11,
"width": 3,
"height": 1
},
{
"id": "dfe4e6e5d1cb542b",
"type": "ui_spacer",
"z": "2131ca674bcfee95",
"name": "spacer",
"group": "4166ed8cf4b1e7d4",
"order": 12,
"width": 3,
"height": 1
},
{
"id": "02a0349dc0753d7c",
"type": "ui_tab",
"name": "PX4 Raw Offboard",
"icon": "Tab 1",
"order": 3,
"disabled": false,
"hidden": false
},
{
"id": "5e97842196ee06b6",
"type": "ui_group",
"name": "Main",
"tab": "02a0349dc0753d7c",
"order": 1,
"disp": true,
"width": "10",
"collapse": false,
"className": ""
},
{
"id": "7d60b4a56db9b8f8",
"type": "ui_tab",
"name": "PX4 Telemetry",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
},
{
"id": "c38375f8835ceadf",
"type": "ui_group",
"name": "Main",
"tab": "7d60b4a56db9b8f8",
"order": 1,
"disp": true,
"width": 6,
"collapse": false,
"className": ""
},
{
"id": "6a7e8942e68a5c2e",
"type": "ui_tab",
"name": "Compute Kit",
"icon": "dashboard",
"order": 4,
"disabled": false,
"hidden": false
},
{
"id": "c6e2654e4bd7b809",
"type": "ui_group",
"name": "Main",
"tab": "6a7e8942e68a5c2e",
"order": 1,
"disp": true,
"width": 6,
"collapse": false,
"className": ""
},
{
"id": "45b05d4941beab87",
"type": "ui_spacer",
"z": "142bd2ed15f43c13",
"name": "spacer",
"group": "c6e2654e4bd7b809",
"order": 4,
"width": 1,
"height": 1
},
{
"id": "dc3e05c5e05fe586",
"type": "inject",
"z": "78ed20307a6c3fca",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 80,
"wires": [
[
"dc5cfe2f7275f0b9"
]
]
},
{
"id": "329048764cfff535",
"type": "ros2-service-call",
"z": "78ed20307a6c3fca",
"server": "27129f80a96ce509",
"x": 660,
"y": 280,
"wires": [
[]
]
},
{
"id": "b93cf972cb4fac2a",
"type": "inject",
"z": "78ed20307a6c3fca",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 180,
"wires": [
[
"2676b0a6ec1bc521"
]
]
},
{
"id": "2676b0a6ec1bc521",
"type": "led",
"z": "78ed20307a6c3fca",
"name": "Teal LED",
"color": "teal",
"x": 340,
"y": 180,
"wires": [
[
"329048764cfff535"
]
]
},
{
"id": "878a64b7619b4c65",
"type": "inject",
"z": "78ed20307a6c3fca",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 280,
"wires": [
[
"23b179f206f63d65"
]
]
},
{
"id": "23b179f206f63d65",
"type": "led",
"z": "78ed20307a6c3fca",
"name": "LED Off",
"color": "black",
"x": 340,
"y": 280,
"wires": [
[
"329048764cfff535"
]
]
},
{
"id": "dc5cfe2f7275f0b9",
"type": "led",
"z": "78ed20307a6c3fca",
"name": "Pink LED",
"color": "pink",
"x": 340,
"y": 80,
"wires": [
[
"329048764cfff535"
]
]
},
{
"id": "36da6b302e1cc73a",
"type": "led-effect",
"z": "78ed20307a6c3fca",
"name": "Rainbow Effect",
"effect": "rainbow",
"x": 360,
"y": 380,
"wires": [
[
"329048764cfff535"
]
]
},
{
"id": "8c98d11de37b7cf0",
"type": "led-effect",
"z": "78ed20307a6c3fca",
"name": "Galaxy Effect",
"effect": "galaxy",
"x": 350,
"y": 480,
"wires": [
[
"329048764cfff535"
]
]
},
{
"id": "193cc1b7828666b2",
"type": "inject",
"z": "78ed20307a6c3fca",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 380,
"wires": [
[
"36da6b302e1cc73a"
]
]
},
{
"id": "39478a268e042548",
"type": "inject",
"z": "78ed20307a6c3fca",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 480,
"wires": [
[
"8c98d11de37b7cf0"
]
]
},
{
"id": "67c12fd25a29cbc9",
"type": "inject",
"z": "01d54c8eebdb2b6e",
"name": "Start Blinking",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 80,
"wires": [
[
"41b571dfa5d811e4"
]
]
},
{
"id": "a33c82f62d2dfa3f",
"type": "led",
"z": "01d54c8eebdb2b6e",
"name": "Cyan LED",
"color": "cyan",
"x": 540,
"y": 80,
"wires": [
[
"fb92098b8a941e96"
]
]
},
{
"id": "fb92098b8a941e96",
"type": "ros2-service-call",
"z": "01d54c8eebdb2b6e",
"server": "27129f80a96ce509",
"x": 740,
"y": 80,
"wires": [
[
"b82195fc26722f5b"
]
]
},
{
"id": "a14f632e34c25609",
"type": "led",
"z": "01d54c8eebdb2b6e",
"name": "LED Off",
"color": "black",
"x": 540,
"y": 200,
"wires": [
[
"ab93b6d4b08ba968"
]
]
},
{
"id": "b82195fc26722f5b",
"type": "delay",
"z": "01d54c8eebdb2b6e",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 930,
"y": 80,
"wires": [
[
"a14f632e34c25609"
]
]
},
{
"id": "ab93b6d4b08ba968",
"type": "ros2-service-call",
"z": "01d54c8eebdb2b6e",
"server": "27129f80a96ce509",
"x": 740,
"y": 200,
"wires": [
[
"d7b8c3705663f6b4"
]
]
},
{
"id": "d7b8c3705663f6b4",
"type": "delay",
"z": "01d54c8eebdb2b6e",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 930,
"y": 200,
"wires": [
[
"0e2e20ce86ad49f6"
]
]
},
{
"id": "23b53ca4f1a452af",
"type": "switch",
"z": "01d54c8eebdb2b6e",
"name": "blink 5 times",
"property": "blinkCount",
"propertyType": "msg",
"rules": [
{
"t": "lt",
"v": "5",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 370,
"y": 140,
"wires": [
[
"a33c82f62d2dfa3f"
],
[]
]
},
{
"id": "0e2e20ce86ad49f6",
"type": "change",
"z": "01d54c8eebdb2b6e",
"name": "increment blinkCount",
"rules": [
{
"t": "set",
"p": "blinkCount",
"pt": "msg",
"to": "blinkCount+1",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 400,
"y": 300,
"wires": [
[
"23b53ca4f1a452af"
]
]
},
{
"id": "41b571dfa5d811e4",
"type": "change",
"z": "01d54c8eebdb2b6e",
"name": "set blinkCount to 0",
"rules": [
{
"t": "set",
"p": "blinkCount",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 150,
"y": 140,
"wires": [
[
"23b53ca4f1a452af"
]
]
},
{
"id": "8959b55e6e6c8655",
"type": "function",
"z": "5f5d6abf64fbf1a2",
"name": "get april tag id",
"func": "if (msg.payload.detections.length > 0) {\n msg.payload = msg.payload.detections[0].id\n} else {\n msg.payload = \"None\"\n}\n\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 280,
"wires": [
[
"190cde7db99adc9b"
]
]
},
{
"id": "1f03e92abd538e9c",
"type": "ros2-subscribe",
"z": "5f5d6abf64fbf1a2",
"server": "27129f80a96ce509",
"topicname": "/apriltag_detections",
"messagetype": "apriltag_msgs/msg/AprilTagDetectionArray",
"x": 150,
"y": 280,
"wires": [
[
"8959b55e6e6c8655"
]
]
},
{
"id": "190cde7db99adc9b",
"type": "switch",
"z": "5f5d6abf64fbf1a2",
"name": "set led color",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "2",
"vt": "num"
},
{
"t": "eq",
"v": "3",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 550,
"y": 280,
"wires": [
[
"a9206bf8899fb0f0"
],
[
"74ea221272d0d9e0"
],
[
"974e2fc73e070d55"
]
]
},
{
"id": "74ea221272d0d9e0",
"type": "led",
"z": "5f5d6abf64fbf1a2",
"name": "Blue LED",
"color": "blue",
"x": 740,
"y": 280,
"wires": [
[
"082b66548ec84e5c"
]
]
},
{
"id": "974e2fc73e070d55",
"type": "led",
"z": "5f5d6abf64fbf1a2",
"name": "Yellow LED",
"color": "yellow",
"x": 750,
"y": 340,
"wires": [
[
"082b66548ec84e5c"
]
]
},
{
"id": "082b66548ec84e5c",
"type": "ros2-service-call",
"z": "5f5d6abf64fbf1a2",
"server": "27129f80a96ce509",
"x": 980,
"y": 280,
"wires": [
[]
]
},
{
"id": "a9206bf8899fb0f0",
"type": "led",
"z": "5f5d6abf64fbf1a2",
"name": "Red LED",
"color": "red",
"x": 740,
"y": 220,
"wires": [
[
"082b66548ec84e5c"
]
]
},
{
"id": "65b1b7513e2bcc35",
"type": "function",
"z": "8c88ec5f6bf1919d",
"name": "get object",
"func": "if (msg.payload.detections.length > 0) {\n msg.payload = msg.payload.detections[0].class_name\n} else {\n msg.payload = \"None\"\n}\n\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 280,
"wires": [
[
"413cc6735c1b44b2",
"5e3a7b461cdb2ce7"
]
]
},
{
"id": "5f2a63e2191be928",
"type": "ros2-subscribe",
"z": "8c88ec5f6bf1919d",
"server": "27129f80a96ce509",
"topicname": "/yolo_detections",
"messagetype": "apriltag_msgs/msg/AprilTagDetectionArray",
"x": 120,
"y": 280,
"wires": [
[
"65b1b7513e2bcc35"
]
]
},
{
"id": "413cc6735c1b44b2",
"type": "switch",
"z": "8c88ec5f6bf1919d",
"name": "set led color",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "dog",
"vt": "str"
},
{
"t": "eq",
"v": "cat",
"vt": "str"
},
{
"t": "eq",
"v": "truck",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 530,
"y": 280,
"wires": [
[
"864ed565c0238fcf"
],
[
"d58ca6c79218e4af"
],
[
"f3517bf771100bf2"
]
]
},
{
"id": "864ed565c0238fcf",
"type": "led",
"z": "8c88ec5f6bf1919d",
"name": "Red LED",
"color": "red",
"x": 720,
"y": 220,
"wires": [
[
"42b2e7ce027aeb19"
]
]
},
{
"id": "d58ca6c79218e4af",
"type": "led",
"z": "8c88ec5f6bf1919d",
"name": "Blue LED",
"color": "blue",
"x": 720,
"y": 280,
"wires": [
[
"42b2e7ce027aeb19"
]
]
},
{
"id": "f3517bf771100bf2",
"type": "led",
"z": "8c88ec5f6bf1919d",
"name": "Yellow LED",
"color": "yellow",
"x": 730,
"y": 340,
"wires": [
[
"42b2e7ce027aeb19"
]
]
},
{
"id": "42b2e7ce027aeb19",
"type": "ros2-service-call",
"z": "8c88ec5f6bf1919d",
"server": "27129f80a96ce509",
"x": 960,
"y": 280,
"wires": [
[]
]
},
{
"id": "5e3a7b461cdb2ce7",
"type": "debug",
"z": "8c88ec5f6bf1919d",
"name": "print class name",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 360,
"wires": []
},
{
"id": "20e24e9a9250368a",
"type": "ros2-subscribe",
"z": "d94edfc7200152be",
"server": "27129f80a96ce509",
"topicname": "/fmu/out/vehicle_odometry",
"messagetype": "",
"x": 250,
"y": 220,
"wires": [
[
"48d2fb203d115b77"
]
]
},
{
"id": "6c40e4ee73b6af52",
"type": "ui_text",
"z": "d94edfc7200152be",
"group": "c38375f8835ceadf",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "x position:",
"format": "{{msg.payload.position[0]}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 750,
"y": 160,
"wires": []
},
{
"id": "e0ce675c6e15fafb",
"type": "debug",
"z": "d94edfc7200152be",
"name": "print odometry",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 760,
"y": 100,
"wires": []
},
{
"id": "988563c0b019fbe9",
"type": "ros2-subscribe",
"z": "d94edfc7200152be",
"server": "27129f80a96ce509",
"topicname": "/fmu/out/sensor_combined",
"messagetype": "",
"x": 250,
"y": 700,
"wires": [
[
"df4954c0e0477871"
]
]
},
{
"id": "2a4377c1ab9d4cb0",
"type": "debug",
"z": "d94edfc7200152be",
"name": "print sensor into",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 760,
"y": 700,
"wires": []
},
{
"id": "48d2fb203d115b77",
"type": "delay",
"z": "d94edfc7200152be",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 510,
"y": 220,
"wires": [
[
"e0ce675c6e15fafb",
"6c40e4ee73b6af52",
"3c4e0ba0bc7de073",
"7b7ab675c9581bdb"
]
]
},
{
"id": "3c4e0ba0bc7de073",
"type": "ui_text",
"z": "d94edfc7200152be",
"group": "c38375f8835ceadf",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "y position:",
"format": "{{msg.payload.position[1]}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 750,
"y": 220,
"wires": []
},
{
"id": "7b7ab675c9581bdb",
"type": "ui_text",
"z": "d94edfc7200152be",
"group": "c38375f8835ceadf",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "z position:",
"format": "{{msg.payload.position[2]}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 750,
"y": 280,
"wires": []
},
{
"id": "df4954c0e0477871",
"type": "delay",
"z": "d94edfc7200152be",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 510,
"y": 700,
"wires": [
[
"2a4377c1ab9d4cb0"
]
]
},
{
"id": "06c9341c5853c3b0",
"type": "ros2-subscribe",
"z": "d94edfc7200152be",
"server": "27129f80a96ce509",
"topicname": "/fmu/out/battery_status",
"messagetype": "",
"x": 240,
"y": 380,
"wires": [
[
"96cb415e914805b7"
]
]
},
{
"id": "9df450188c95d188",
"type": "debug",
"z": "d94edfc7200152be",
"name": "print battery into",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 760,
"y": 380,
"wires": []
},
{
"id": "96cb415e914805b7",
"type": "delay",
"z": "d94edfc7200152be",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 510,
"y": 380,
"wires": [
[
"9df450188c95d188",
"1f97085f5b3ab281"
]
]
},
{
"id": "1f97085f5b3ab281",
"type": "ui_text",
"z": "d94edfc7200152be",
"group": "c38375f8835ceadf",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "battery remaining:",
"format": "{{msg.payload.remaining}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 770,
"y": 440,
"wires": []
},
{
"id": "c34cfda6f5e986c8",
"type": "ros2-subscribe",
"z": "d94edfc7200152be",
"server": "27129f80a96ce509",
"topicname": "/fmu/out/vehicle_status",
"messagetype": "",
"x": 240,
"y": 520,
"wires": [
[
"54b642d806f41e64"
]
]
},
{
"id": "10e7e3d62246b870",
"type": "debug",
"z": "d94edfc7200152be",
"name": "print vehicle status",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 520,
"wires": []
},
{
"id": "54b642d806f41e64",
"type": "delay",
"z": "d94edfc7200152be",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 510,
"y": 520,
"wires": [
[
"10e7e3d62246b870",
"a07e291714f0d141"
]
]
},
{
"id": "a07e291714f0d141",
"type": "ui_text",
"z": "d94edfc7200152be",
"group": "c38375f8835ceadf",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "flight mode:",
"format": "{{msg.payload.nav_state}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 750,
"y": 580,
"wires": []
},
{
"id": "ae776f6d1da02661",
"type": "ui_text",
"z": "a691db1a9e113a84",
"group": "4166ed8cf4b1e7d4",
"order": 14,
"width": 0,
"height": 0,
"name": "",
"label": "Altitude",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 820,
"y": 60,
"wires": []
},
{
"id": "124ecd64576594fd",
"type": "ros2-subscribe",
"z": "a691db1a9e113a84",
"server": "27129f80a96ce509",
"topicname": "/fmu/out/vehicle_global_position",
"messagetype": "",
"x": 130,
"y": 180,
"wires": [
[
"dbbf851b16148a77"
]
]
},
{
"id": "8eeeac07046c07bc",
"type": "function",
"z": "a691db1a9e113a84",
"name": "round altitude",
"func": "msg.payload = Math.round((msg.payload.alt) * 100) / 100\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 80,
"wires": [
[
"ae776f6d1da02661",
"dbb0a6a6836672cb"
]
]
},
{
"id": "dbb0a6a6836672cb",
"type": "change",
"z": "a691db1a9e113a84",
"name": "",
"rules": [
{
"t": "set",
"p": "drone_altitude",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 860,
"y": 120,
"wires": [
[]
]
},
{
"id": "86049deb15395654",
"type": "debug",
"z": "a691db1a9e113a84",
"name": "debug 5",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 460,
"y": 460,
"wires": []
},
{
"id": "ba286d4657da79aa",
"type": "ros2-publish",
"z": "a691db1a9e113a84",
"server": "27129f80a96ce509",
"topicname": "/fmu/in/vehicle_command",
"messagetype": "px4_msgs/msg/VehicleCommand",
"stampheader": false,
"x": 510,
"y": 380,
"wires": [
[]
]
},
{
"id": "dbbf851b16148a77",
"type": "delay",
"z": "a691db1a9e113a84",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 370,
"y": 180,
"wires": [
[
"8eeeac07046c07bc",
"a1e737cb92abf1f5",
"c395d188ef1c9d18",
"6bd891e55027cd3a"
]
]
},
{
"id": "386e0bdcda50bed8",
"type": "arm",
"z": "a691db1a9e113a84",
"name": "",
"x": 310,
"y": 340,
"wires": [
[
"ba286d4657da79aa"
]
]
},
{
"id": "4464420002130254",
"type": "inject",
"z": "a691db1a9e113a84",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 340,
"wires": [
[
"386e0bdcda50bed8"
]
]
},
{
"id": "a1e737cb92abf1f5",
"type": "function",
"z": "a691db1a9e113a84",
"name": "latitude",
"func": "msg.payload = msg.payload.lat\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 180,
"wires": [
[
"4b71f66bf533618a",
"ba80fdd4b8731061"
]
]
},
{
"id": "6bd891e55027cd3a",
"type": "debug",
"z": "a691db1a9e113a84",
"name": "print drone location",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 310,
"y": 80,
"wires": []
},
{
"id": "c395d188ef1c9d18",
"type": "function",
"z": "a691db1a9e113a84",
"name": "longitude",
"func": "msg.payload = msg.payload.lon\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 280,
"wires": [
[
"f6c1daa76322acba",
"ecb1849d8cdb5fba"
]
]
},
{
"id": "4b71f66bf533618a",
"type": "ui_text",
"z": "a691db1a9e113a84",
"group": "4166ed8cf4b1e7d4",
"order": 14,
"width": 0,
"height": 0,
"name": "",
"label": "Latitude",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 820,
"y": 180,
"wires": []
},
{
"id": "f6c1daa76322acba",
"type": "ui_text",
"z": "a691db1a9e113a84",
"group": "4166ed8cf4b1e7d4",
"order": 14,
"width": 0,
"height": 0,
"name": "",
"label": "Longitude",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"style": false,
"font": "",
"fontSize": 16,
"color": "#000000",
"x": 820,
"y": 300,
"wires": []
},
{
"id": "ba80fdd4b8731061",
"type": "change",
"z": "a691db1a9e113a84",
"name": "flow.drone_latitude",
"rules": [
{
"t": "set",
"p": "drone_latitude",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
"y": 240,
"wires": [
[]
]
},
{
"id": "ecb1849d8cdb5fba",
"type": "change",
"z": "a691db1a9e113a84",
"name": "flow.drone_latitude",
"rules": [
{
"t": "set",
"p": "drone_longitude",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
"y": 360,
"wires": [
[]
]
},
{
"id": "3e0c8785a15f6a18",
"type": "inject",
"z": "a691db1a9e113a84",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 400,
"wires": [
[
"9a5933e0dbdaedcc"
]
]
},
{
"id": "9a5933e0dbdaedcc",
"type": "function",
"z": "a691db1a9e113a84",
"name": "takeoff",
"func": "let json = {\n \"command\": 22, \n \"param1\": -1, \n \"param2\": 0, \n \"param3\": 0, \n \"param4\": 0, \n \"param5\": flow.get(\"drone_latitude\"), \n \"param6\": flow.get(\"drone_longitude\"), \n \"param7\": flow.get(\"drone_altitude\") + 3\n}\nmsg.payload = json\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 310,
"y": 400,
"wires": [
[
"86049deb15395654",
"ba286d4657da79aa"
]
]
},
{
"id": "a3c175e5e85914c8",
"type": "land",
"z": "a691db1a9e113a84",
"name": "",
"x": 310,
"y": 460,
"wires": [
[
"ba286d4657da79aa"
]
]
},
{
"id": "c2eeada9357d6016",
"type": "inject",
"z": "a691db1a9e113a84",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 460,
"wires": [
[
"a3c175e5e85914c8"
]
]
},
{
"id": "1c1de41bb485044a",
"type": "ros2-publish",
"z": "3f767aee767c6d1c",
"server": "27129f80a96ce509",
"topicname": "/dexi/offboard_manager",
"messagetype": "",
"stampheader": false,
"x": 850,
"y": 240,
"wires": [
[]
]
},
{
"id": "dc4e893b18c42a9a",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 160,
"wires": [
[
"28d8858874b2ed8c"
]
]
},
{
"id": "82d80e96b9655371",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 100,
"wires": [
[
"87a2f2cf05c31f87"
]
]
},
{
"id": "87a2f2cf05c31f87",
"type": "arm",
"z": "3f767aee767c6d1c",
"name": "",
"x": 470,
"y": 100,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "30912c788cfaadb3",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 340,
"wires": [
[
"ffa7c5b61d8bd568"
]
]
},
{
"id": "ffa7c5b61d8bd568",
"type": "land",
"z": "3f767aee767c6d1c",
"name": "",
"x": 470,
"y": 340,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "28d8858874b2ed8c",
"type": "takeoff",
"z": "3f767aee767c6d1c",
"name": "",
"altitude": "2",
"x": 490,
"y": 160,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "882cab4293f9e0c0",
"type": "forward",
"z": "3f767aee767c6d1c",
"name": "",
"distance": "1",
"x": 1290,
"y": 60,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "866d2678c8d00a8d",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1100,
"y": 60,
"wires": [
[
"882cab4293f9e0c0"
]
]
},
{
"id": "3cdaa5bb28be592a",
"type": "offboard",
"z": "3f767aee767c6d1c",
"action": "stop",
"x": 530,
"y": 280,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "5053bb6941fd0593",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 280,
"wires": [
[
"3cdaa5bb28be592a"
]
]
},
{
"id": "cf1c03f44806b4bc",
"type": "offboard",
"z": "3f767aee767c6d1c",
"action": "start",
"x": 530,
"y": 220,
"wires": [
[
"1c1de41bb485044a"
]
]
},
{
"id": "335e4963eba951b4",
"type": "inject",
"z": "3f767aee767c6d1c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 220,
"wires": [
[
"cf1c03f44806b4bc"
]
]
},
{
"id": "85e5a558b3c3d3b3",
"type": "backward",
"z": "3f767aee767c6d1c",
"name": "",
"distance": 1,
"x":