提示词分段编排解耦
This commit is contained in:
448
backend_service/src/prompts/partials/scene1_examples.txt
Normal file
448
backend_service/src/prompts/partials/scene1_examples.txt
Normal file
@@ -0,0 +1,448 @@
|
||||
## 四、场景示例
|
||||
|
||||
#### 场景 1:地面到12米绕外围查看打开的窗户(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,绕着外围看有没有打开的窗户,发现则进行拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterAndPhotoWindows",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectWindows",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectOpenWindowsWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"window","description":"打开的窗户","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 2:地面到12米沿外围查找打开的窗户(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,沿着外围查找所有打开的窗户并拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterAndPhotoOpenWindows",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectOpenWindows",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectAllOpenWindowsWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"window","description":"打开的窗户","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 3:空中上升后绕外围侦察打开窗户(Sequence)
|
||||
**指令**:“无人机当前在空中,再往上飞3米,接着绕这栋楼外围侦察有没有打开的窗户,看到了就拍照传回来。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "RiseAndDetectOpenWindows",
|
||||
"children": [
|
||||
{"type":"action","name":"move_direction","params":{"direction":"up","distance":3.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectOpenWindows",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8},
|
||||
{"x": -108.5, "y": 241.8},
|
||||
{"x": -108.5, "y": 289.8},
|
||||
{"x": -24.0, "y": 292.8},
|
||||
{"x": -24.0, "y": 241.8}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectOpenWindowsWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"window","description":"打开的窗户"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"window","description":"打开的窗户","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 4:地面到12米绕外围巡视杂物堆积(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,绕着外围巡视杂物堆积现象,发现则进行拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterAndPhotoGarbageObserve",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectGarbageObserve",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectGarbageWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"garbage","description":"杂物堆积","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 5:地面到12米沿外围查找杂物堆积(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,沿着外围查找所有的杂物堆积并拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterAndPhotoGarbage",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectGarbage",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectGarbageWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"garbage","description":"杂物堆积","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 6:空中下降后绕外围侦察杂物堆积(Sequence)
|
||||
**指令**:“无人机当前在空中,往下飞3米,接着绕这栋楼外围侦察有没有杂物堆积,看到了就拍照传回来。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "DescendAndDetectGarbage",
|
||||
"children": [
|
||||
{"type":"action","name":"move_direction","params":{"direction":"down","distance":3.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectGarbage",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8},
|
||||
{"x": -108.5, "y": 241.8},
|
||||
{"x": -108.5, "y": 289.8},
|
||||
{"x": -24.0, "y": 292.8},
|
||||
{"x": -24.0, "y": 241.8}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectGarbageWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"garbage","description":"杂物堆积"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"garbage","description":"杂物堆积","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 7:地面到12米绕外围查看是否有人(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,绕着外围看有没有人,发现则进行拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterAndPhotoPerson",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetectPerson",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectPersonWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"person","description":"人员"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"person","description":"人员"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"person","description":"人员","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 8:地面到12米沿外围逆时针查找人员(Sequence)
|
||||
**指令**:“无人机当前在地面,去面前大楼的12米高处,沿着外围逆时针查找所有的人并拍照。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "FlyPerimeterCounterClockwiseAndPhotoPerson",
|
||||
"children": [
|
||||
{"type":"action","name":"system_checks","params":{"check_level":"comprehensive"}},
|
||||
{"type":"action","name":"takeoff","params":{"altitude":10.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolCCWAndDetectPerson",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 292.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 289.8, "depth": 12.0},
|
||||
{"x": -108.5, "y": 241.8, "depth": 12.0},
|
||||
{"x": -24.0, "y": 241.8, "depth": 12.0}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectPersonWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"person","description":"人员"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"person","description":"人员"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"person","description":"人员","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 场景 9:空中上升后沿建筑外围侦察人员(Sequence)
|
||||
**指令**:“无人机当前在空中,再往上飞3米,接着绕这栋楼外围侦察有没有人,看到了就拍照传回来。”
|
||||
**结构**:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Sequence",
|
||||
"name": "RiseAndPatrolPerimeter",
|
||||
"children": [
|
||||
{"type":"action","name":"move_direction","params":{"direction":"up","distance":3.0}},
|
||||
{
|
||||
"type": "Parallel",
|
||||
"name": "PatrolAndDetect",
|
||||
"params": {"policy": "success_on_one"},
|
||||
"children": [
|
||||
{
|
||||
"type": "action",
|
||||
"name": "fly_sequence",
|
||||
"params": {
|
||||
"waypoints": [
|
||||
{"x": -24.0, "y": 241.8},
|
||||
{"x": -108.5, "y": 241.8},
|
||||
{"x": -108.5, "y": 289.8},
|
||||
{"x": -24.0, "y": 292.8},
|
||||
{"x": -24.0, "y": 241.8}
|
||||
],
|
||||
"coordinate_frame": "local_enu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "decorator",
|
||||
"name": "SuccessIsFailure",
|
||||
"child": {
|
||||
"type": "Sequence",
|
||||
"name": "DetectAndPhotoWhileFlying",
|
||||
"children": [
|
||||
{"type":"action","name":"object_detect","params":{"target_class":"person","description":"建筑外围人员"}},
|
||||
{"type":"condition","name":"object_detected","params":{"target_class":"person","description":"建筑外围人员"}},
|
||||
{"type":"action","name":"take_photos","params":{"target_class":"person","description":"建筑外围人员","track_time":10.0}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user