movement: smooth animated moves (move duration, observable intermediate positions) + proactive cruise (glide while the LLM thinks, collision-safe, reported back); verified mission with gpt-5.6-luna

This commit is contained in:
opencode
2026-08-08 21:36:32 +03:00
parent 1cb3bdc46e
commit 315762363e
6 changed files with 201 additions and 11 deletions
+13 -4
View File
@@ -142,6 +142,7 @@ async def run_llm_agent(
vision: bool | None = None,
digest: bool | None = None,
look_every: int = 0,
cruise: float = 0.0,
) -> dict[str, Any]:
"""Autonomous LLM run: controller + nudge/correct loop (see llm_agent)."""
from testbed.llm_agent import LLMController, run_llm_agent_loop
@@ -233,9 +234,9 @@ async def run_scripted_agent(
if detour_steps > 0:
# Escape the obstacle before re-aiming: keep the detour heading.
mv = (await client.call_tool("move", {"forward": 0.8})).output
mv = (await client.call_tool("move", {"forward": 0.8, "duration": 0.6})).output
summary["tool_calls"] += 1
log("tool", 'move({"forward": 0.8}) [detour]')
log("tool", 'move({"forward": 0.8, "duration": 0.6}) [detour]')
log("bridge", f"ok {json.dumps(mv)}")
if mv.get("moved", 0.0) < 0.2 and detour_turns < 6:
detour_turns += 1
@@ -267,9 +268,9 @@ async def run_scripted_agent(
log("tool", f'turn({{"yaw_deg": {delta * 0.8:.1f}}})')
log("bridge", f"ok {json.dumps(turn)}")
else:
mv = (await client.call_tool("move", {"forward": 0.8})).output
mv = (await client.call_tool("move", {"forward": 0.8, "duration": 0.6})).output
summary["tool_calls"] += 1
log("tool", 'move({"forward": 0.8})')
log("tool", 'move({"forward": 0.8, "duration": 0.6})')
log("bridge", f"ok {json.dumps(mv)}")
if mv.get("collision"):
consecutive_collisions += 1
@@ -315,6 +316,7 @@ async def run_demo(args: argparse.Namespace) -> dict[str, Any]:
vision=args.vision,
digest=args.digest,
look_every=args.look_every,
cruise=args.cruise,
)
elif args.agent == "scripted":
summary = await run_scripted_agent(
@@ -338,6 +340,7 @@ async def run_demo(args: argparse.Namespace) -> dict[str, Any]:
vision=args.vision,
digest=args.digest,
look_every=args.look_every,
cruise=args.cruise,
)
if summary.get("interacted"):
return summary
@@ -431,6 +434,12 @@ def main() -> int:
default=3,
help="attach a fresh camera frame every N agent steps (0 disables; default 3)",
)
parser.add_argument(
"--cruise",
type=float,
default=1.0,
help="proactive motion: glide forward (meters) while the LLM thinks (0 disables)",
)
parser.add_argument(
"--frame",
default="demo_final_frame.png",