优化
This commit is contained in:
@@ -63,9 +63,10 @@ spec:
|
||||
confirmation_policy: on_ambiguity
|
||||
- name: seat.set_longitudinal_position
|
||||
description: >-
|
||||
Set one front seat's fore-aft rail position. position_pct is an absolute target: 0 is the
|
||||
rearmost mechanical limit and 100 is the forwardmost limit. Resolve relative requests such
|
||||
as "move back a little" against the current position supplied in runtime state. For a
|
||||
Set one front seat's fore-aft rail position. For the selected Denza N7 profile, position_pct
|
||||
is an absolute target: 0 is the forwardmost mechanical limit and 100 is the rearmost limit.
|
||||
Resolve relative requests such as "move back a little" against the current position supplied
|
||||
in runtime state: forward decreases the value and backward increases it. For a
|
||||
vehicle-specific physical relative request, distance_mm may be supplied and the runtime
|
||||
converts it to an absolute position_pct before CAN compilation.
|
||||
target_devices:
|
||||
@@ -92,8 +93,9 @@ spec:
|
||||
confirmation_policy: on_ambiguity
|
||||
- name: seat.set_cushion_tilt
|
||||
description: >-
|
||||
Set the seat-cushion pitch for one front seat. position_pct is absolute: 0 places the front
|
||||
edge at its lowest limit and 100 raises the front edge to its highest tilt limit.
|
||||
Set the seat-cushion pitch for one front seat. For the selected Denza N7 profile,
|
||||
position_pct is absolute: 0 places the front edge at its highest limit and 100 lowers the
|
||||
front edge to its lowest tilt limit.
|
||||
target_devices:
|
||||
- seat_cushion_tilt_motor
|
||||
target_scopes:
|
||||
|
||||
@@ -335,7 +335,7 @@ class SeatServiceIntegrationTests(unittest.TestCase):
|
||||
"domain": "seat",
|
||||
"capability": "seat.set_longitudinal_position",
|
||||
"target_scope": "driver",
|
||||
"operation": "decrease",
|
||||
"operation": "increase",
|
||||
"parameters": [{"name": "position_pct", "value": position}],
|
||||
"reason": "Model resolved the relative request.",
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class SeatServiceIntegrationTests(unittest.TestCase):
|
||||
with patch.object(
|
||||
self.service.openai,
|
||||
"interpret",
|
||||
side_effect=[output(40), output(30)],
|
||||
side_effect=[output(60), output(70)],
|
||||
) as interpret:
|
||||
first = self.service.process(
|
||||
"主驾往后一点", "openai", "conv-motion-follow-up"
|
||||
@@ -362,18 +362,18 @@ class SeatServiceIntegrationTests(unittest.TestCase):
|
||||
first["actuator_state"]["driver"]["position"]["longitudinal"][
|
||||
"position_pct"
|
||||
],
|
||||
40,
|
||||
60,
|
||||
)
|
||||
self.assertEqual(
|
||||
second["actuator_state"]["driver"]["position"]["longitudinal"][
|
||||
"position_pct"
|
||||
],
|
||||
30,
|
||||
70,
|
||||
)
|
||||
second_context = interpret.call_args_list[1].args[1]
|
||||
self.assertEqual(
|
||||
second_context["devices"]["driver"]["position"]["longitudinal"]["position_pct"],
|
||||
40,
|
||||
60,
|
||||
)
|
||||
|
||||
def test_model_relative_physical_motion_uses_vehicle_profile(self) -> None:
|
||||
@@ -384,7 +384,7 @@ class SeatServiceIntegrationTests(unittest.TestCase):
|
||||
"domain": "seat",
|
||||
"capability": "seat.set_longitudinal_position",
|
||||
"target_scope": "driver",
|
||||
"operation": "increase",
|
||||
"operation": "decrease",
|
||||
"parameters": [{"name": "distance_mm", "value": 50}],
|
||||
"reason": "Move forward by a physical distance.",
|
||||
},
|
||||
@@ -414,7 +414,7 @@ class SeatServiceIntegrationTests(unittest.TestCase):
|
||||
self.assertEqual(result["status"], "succeeded")
|
||||
self.assertEqual(result["vehicle"]["id"], "denza_n7")
|
||||
operations = result["function_config"]["spec"]["operations"]
|
||||
self.assertEqual(operations[0]["parameters"], {"position_pct": 73})
|
||||
self.assertEqual(operations[0]["parameters"], {"position_pct": 27})
|
||||
self.assertEqual(
|
||||
operations[1]["parameters"],
|
||||
{"position_pct": 38, "angle_deg": 116},
|
||||
|
||||
Reference in New Issue
Block a user