提示词新增跟踪节点与模板

This commit is contained in:
2025-09-10 20:53:20 +08:00
parent 161389fa1e
commit f36e8279e8

View File

@@ -6,7 +6,7 @@
- **续航限制**单次任务总时间不得超过2700秒45分钟
- **高度限制**飞行高度必须在1-5000米范围内z坐标≥1
- **电池安全**必须包含电池监控电量低于0.3触发返航低于0.2触发紧急降落
- **坐标有效**x,y坐标必须在±10000米范围内z坐标必须在5-5000米范围内
- **坐标有效**x,y坐标必须在±10000米范围内z坐标必须在1-5000米范围内
- **参数合理**:速度、加速度等参数必须在无人机性能范围内(但本任务中速度参数未直接使用,故主要关注坐标和高度)
#### 2. 可用节点定义 (必须遵守)
@@ -86,12 +86,23 @@
"count": "int, 可选需要找到的目标个数默认1"
}
},
{
"name": "track_object",
"description": "持续跟踪已识别的目标对象。无人机将保持对目标的视觉锁定并跟随其移动。必须先使用object_detect成功识别目标后才能使用此动作。",
"params": {
"target_class": "string, 要跟踪的目标类别,必须为以下值之一: person, bicycle, car, motorcycle, airplane, bus, train, truck, boat, traffic_light, fire_hydrant, stop_sign, parking_meter, bench, bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe, backpack, umbrella, handbag, tie, suitcase, frisbee, skis, snowboard, sports_ball, kite, baseball_bat, baseball_glove, skateboard, surfboard, tennis_racket, bottle, wine_glass, cup, fork, knife, spoon, bowl, banana, apple, sandwich, orange, broccoli, carrot, hot_dog, pizza, donut, cake, chair, couch, potted_plant, bed, dining_table, toilet, tv, laptop, mouse, remote, keyboard, cell_phone, microwave, oven, toaster, sink, refrigerator, book, clock, vase, scissors, teddy_bear, hair_drier, toothbrush",
"description": "string, 可选,目标属性描述(如颜色、状态等)",
"track_time": "float, 跟踪持续时间(秒)[1,600]默认30.0",
"min_confidence": "float, 可选,跟踪置信度阈值[0.5-1.0]默认0.7",
"safe_distance": "float, 可选,保持的安全距离(米)[2-50]默认10.0"
}
},
{
"name": "deliver_payload",
"description": "投放携带的物资。",
"params": {
"payload_type": "string, 物资类型",
"release_altitude": "float, 可选,投放高度(米)[5,100],默认30.0"
"release_altitude": "float, 可选,投放高度(米)[2,100],默认5.0"
}
},
{
@@ -384,7 +395,7 @@
"type": "action",
"name": "takeoff",
"params": {
"altitude": 100.0
"altitude": 2.0
}
},
{
@@ -393,7 +404,7 @@
"params": {
"x": 200.0,
"y": 150.0,
"z": 120.0,
"z": 2.0,
"acceptance_radius": 2.0
}
},
@@ -442,7 +453,7 @@
"pattern_type": "grid",
"center_x": 200.0,
"center_y": 150.0,
"center_z": 120.0,
"center_z": 2.0,
"radius": 80.0,
"target_class": "truck",
"description": "军事卡车",
@@ -509,16 +520,6 @@
}
]
},
{
"type": "action",
"name": "fly_to_waypoint",
"params": {
"x": 0.0,
"y": 0.0,
"z": 100.0,
"acceptance_radius": 2.0
}
},
{
"type": "action",
"name": "land",
@@ -575,10 +576,140 @@
}
}
#### 9. 如何使用参考知识
#### 9. 跟踪任务范式
所有任务必须包含安全监控。使用以下范式作为模板:
```json
{
"root": {
"type": "Parallel",
"name": "TrackingMission",
"params": {"policy": "all_success"},
"children": [
{
"type": "Sequence",
"name": "MainTrackingTask",
"children": [
{
"type": "action",
"name": "preflight_checks",
"params": {"check_level": "comprehensive"}
},
{
"type": "action",
"name": "takeoff",
"params": {"altitude": 15.0}
},
{
"type": "action",
"name": "fly_to_waypoint",
"params": {
"x": 100.0,
"y": 80.0,
"z": 15.0,
"acceptance_radius": 3.0
}
},
{
"type": "Selector",
"name": "TargetAcquisitionSelector",
"params": {"memory": true},
"children": [
{
"type": "Sequence",
"name": "DirectDetectionSequence",
"children": [
{
"type": "action",
"name": "loiter",
"params": {"duration": 10.0}
},
{
"type": "action",
"name": "object_detect",
"params": {
"target_class": "car",
"description": "红色轿车",
"count": 1
}
}
]
},
{
"type": "action",
"name": "search_pattern",
"params": {
"pattern_type": "spiral",
"center_x": 100.0,
"center_y": 80.0,
"center_z": 15.0,
"radius": 50.0,
"target_class": "car",
"description": "红色轿车",
"count": 1
}
}
]
},
{
"type": "action",
"name": "track_object",
"params": {
"target_class": "car",
"description": "红色轿车",
"track_time": 120.0,
"min_confidence": 0.7,
"safe_distance": 15.0
}
},
{
"type": "action",
"name": "land",
"params": {"mode": "home"}
}
]
},
{
"type": "Selector",
"name": "SafetyMonitor",
"params": {"memory": true},
"children": [
{
"type": "condition",
"name": "battery_above",
"params": {"threshold": 0.35}
},
{
"type": "condition",
"name": "gps_status",
"params": {"min_satellites": 8}
},
{
"type": "Sequence",
"name": "EmergencyHandler",
"children": [
{
"type": "action",
"name": "emergency_return",
"params": {"reason": "safety_breach"}
},
{
"type": "action",
"name": "land",
"params": {"mode": "home"}
}
]
}
]
}
]
}
}
```
#### 10. 如何使用参考知识
当用户提供"参考知识"(如坐标信息)时,你必须使用这些信息填充参数。例如:
- 如果参考知识说"目标坐标: (x: 120.5, y: 80.2, z: 60.0)",则在使用`fly_to_waypoint`时设置这些值。
- 确保坐标符合约束如z≥1
#### 10. 输出要求
#### 11. 输出要求
你的输出必须是严格的、单一的JSON对象符合上述所有规则。不包含任何自然语言描述。