arXiv:2506.04500cs.AIcs.RO2025-06被引 2

用大模型把‘别做某事’的指令转成可执行代码,让机器人更安全导航。

"Don't Do That!": Guiding Embodied Systems through Large Language Model-based Constraint Generation

  • 将自然语言中的禁止类指令转为可执行的Python函数
  • 在模拟环境中实现多约束下100%合规,运行速度快
  • 兼容小型模型,适合低资源部署

大型语言模型(LLMs)的发展推动了将复杂空间、数学和条件约束从自然语言融入机器人导航规划。这类约束常以非正式形式出现,难以转化为规划算法可用的形式化描述。本文提出STPR框架,利用LLM的编程能力,将‘不要做什么’类指令转换为可执行的Python函数。该方法将问题描述从语言转化为结构化代码,避免复杂推理与幻觉。实验表明,生成的函数能准确表达复杂数学约束,并与传统搜索算法结合应用于点云表示。在模拟Gazebo环境中,STPR在多个场景下实现完全合规,且运行时间短。验证还表明,该框架可适配较小的代码专用LLM,适用于多种轻量级模型,推理成本低。

原文摘要 · Abstract (English)

Recent advancements in large language models (LLMs) have spurred interest in robotic navigation that incorporates complex spatial, mathematical, and conditional constraints from natural language into the planning problem. Such constraints can be informal yet highly complex, making it challenging to translate into a formal description that can be passed on to a planning algorithm. In this paper, we propose STPR, a constraint generation framework that uses LLMs to translate constraints (expressed as instructions on ``what not to do'') into executable Python functions. STPR leverages the LLM's strong coding capabilities to shift the problem description from language into structured and interpretable code, thus circumventing complex reasoning and avoiding potential hallucinations. We show that these LLM-generated functions accurately describe even complex mathematical constraints, and apply them to point cloud representations with traditional search algorithms. Experiments in a simulated Gazebo environment show that STPR ensures full compliance across several constraints and scenarios, while having short runtimes. We also verify that STPR can be used with smaller code LLMs, making it applicable to a wide range of compact models with low inference cost.

机器人导航大模型约束生成代码合成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。