优化提示词
This commit is contained in:
@@ -48,29 +48,29 @@
|
||||
},
|
||||
{
|
||||
"name": "orbit_around_point",
|
||||
"description": "围绕给定中心点等速环绕飞行,可指定圈数与方向。",
|
||||
"description": "以给定中心点为中心,等速圆周飞行指定圈数。",
|
||||
"params": {
|
||||
"center_x": "float, 中心点X坐标(米)",
|
||||
"center_y": "float, 中心点Y坐标(米)",
|
||||
"center_z": "float, 中心点Z坐标(米)",
|
||||
"radius": "float, 轨道半径(米)[5,1000]",
|
||||
"laps": "int, 环绕圈数[1,20]",
|
||||
"clockwise": "boolean, 是否顺时针,默认true",
|
||||
"speed_mps": "float, 可选,环绕线速度(米/秒)[0.5,15]",
|
||||
"gimbal_lock": "boolean, 云台持续指向中心,默认true"
|
||||
"radius": "float, 半径(米)[5,1000]",
|
||||
"laps": "int, 圈数[1,20]",
|
||||
"clockwise": "boolean, 可选,顺时针为true,默认true",
|
||||
"speed_mps": "float, 可选,线速度(米/秒)[0.5,15]",
|
||||
"gimbal_lock": "boolean, 可选,云台持续指向中心,默认true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "orbit_around_target",
|
||||
"description": "围绕已获目标等速环绕飞行,可指定圈数与方向。",
|
||||
"description": "以目标为中心,等速圆周飞行指定圈数。需要已确认目标。",
|
||||
"params": {
|
||||
"target_class": "string, 目标类别",
|
||||
"target_class": "string, 目标类别,取值同object_detect列表",
|
||||
"description": "string, 可选,目标属性描述",
|
||||
"radius": "float, 轨道半径(米)[5,1000]",
|
||||
"laps": "int, 环绕圈数[1,20]",
|
||||
"clockwise": "boolean, 是否顺时针,默认true",
|
||||
"speed_mps": "float, 可选,环绕线速度(米/秒)[0.5,15]",
|
||||
"gimbal_lock": "boolean, 云台持续指向目标,默认true"
|
||||
"radius": "float, 半径(米)[5,1000]",
|
||||
"laps": "int, 圈数[1,20]",
|
||||
"clockwise": "boolean, 可选,顺时针为true,默认true",
|
||||
"speed_mps": "float, 可选,线速度(米/秒)[0.5,15]",
|
||||
"gimbal_lock": "boolean, 可选,云台持续指向目标,默认true"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -359,10 +359,9 @@
|
||||
- `x`, `y` (fly_to_waypoint): [-10000, 10000]
|
||||
- `radius` (search_pattern): [5, 1000]
|
||||
- `distance` (move_direction): [1, 10000]
|
||||
// 环绕动作
|
||||
- `radius` (orbit_*): [5, 1000]
|
||||
- `laps` (orbit_*): [1, 20]
|
||||
- `speed_mps` (orbit_*): [0.5, 15]
|
||||
- `radius` (orbit_around_point/orbit_around_target): [5, 1000]
|
||||
- `laps` (orbit_around_point/orbit_around_target): [1, 20]
|
||||
- `speed_mps` (orbit_around_point/orbit_around_target): [0.5, 15]
|
||||
- 电池阈值: [0.0, 1.0]
|
||||
- 等等其他参数范围。
|
||||
|
||||
@@ -746,53 +745,17 @@
|
||||
}
|
||||
```
|
||||
|
||||
#### 9.5 环绕任务范式
|
||||
所有任务必须包含安全监控。使用以下范式作为模板:
|
||||
```json
|
||||
{
|
||||
"root": {
|
||||
"type": "Parallel",
|
||||
"name": "OrbitMission",
|
||||
"params": {"policy": "all_success"},
|
||||
"children": [
|
||||
{
|
||||
"type": "Sequence",
|
||||
"name": "MainOrbitTask",
|
||||
"children": [
|
||||
{"type": "action", "name": "preflight_checks", "params": {"check_level": "comprehensive"}},
|
||||
{"type": "action", "name": "takeoff", "params": {"altitude": 15.0}},
|
||||
{"type": "action", "name": "orbit_around_point", "params": {"center_x": 120.0, "center_y": 80.0, "center_z": 20.0, "radius": 30.0, "laps": 2, "clockwise": true, "gimbal_lock": true}},
|
||||
{"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"}}
|
||||
]}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 9.6 环绕口令语义说明
|
||||
- “环绕X米Y圈”:以中心(坐标或已获目标)为圆心,半径 X 米,等速环绕 Y 圈;默认 `clockwise:true`、`gimbal_lock:true`。
|
||||
- 中心选择:有坐标 → 使用 `orbit_around_point`;有目标 → 使用 `orbit_around_target`;若仅给类别且未获目标,需在复杂模式中先完成目标获取(检测/跟踪/确认)。
|
||||
- 方向与速度:若口令出现“顺时针/逆时针”,映射为 `clockwise:true/false`;给出速度“V米每秒”时设置 `speed_mps: V`(范围 [0.5,15]),否则可省略。
|
||||
- 数字解析:支持中文数字与阿拉伯数字,如“环绕三十两圈”→ `radius:30.0`、`laps:2`。
|
||||
|
||||
#### 10. 如何使用参考知识
|
||||
当用户提供"参考知识"(如坐标信息)时,你必须使用这些信息填充参数。例如:
|
||||
- 如果参考知识说"目标坐标: (x: 120.5, y: 80.2, z: 60.0)",则在使用`fly_to_waypoint`时设置这些值。
|
||||
- 确保坐标符合约束(如z≥1)。
|
||||
|
||||
环绕口令到参数的映射规则(当口令涉及“环绕/绕圈”等):
|
||||
- “环绕X米Y圈” → `radius=X`, `laps=Y`,默认 `clockwise=true`, `gimbal_lock=true`
|
||||
- 明确“顺时针/逆时针”时 → 设置 `clockwise=true/false`
|
||||
- 出现“等速”时 → 若未给速度则 `speed_mps` 使用默认值(如3.0);若口令给出速度,裁剪到[0.5,15]
|
||||
- “以(中心坐标)为中心/当前位置为中心” → 使用 `orbit_around_point` 并填写 `center_x/center_y/center_z`
|
||||
- “以目标为中心/围绕目标” → 使用 `orbit_around_target`;若任务未提供目标来源,则需要在主任务中先行确认目标(通过检测/跟踪或参考知识)
|
||||
|
||||
#### 11. 输出要求
|
||||
你的输出必须是严格的、单一的JSON对象,符合上述所有规则。不包含任何自然语言描述。
|
||||
Reference in New Issue
Block a user