Manuscript Offprint

arXiv:2610.19617

Instruction-Conditioned Motion Control for Robotic Arms: Language-to-Code Decomposition and Reinforcement Learning

Fan Huang, Dezhong Tong, Changyu Chen, Haewoon Kwak, Jisun An

Fan Huang 1,∗^{1,*}, Dezhong Tong 2^{2}, Changyu Chen 3^{3}, Haewoon Kwak 1^{1}, and Jisun An 1^{1}

1^{1}Indiana University Bloomington 2^{2}University of Michigan 3^{3}Singapore Management University

Abstract—Instruction-Conditioned Motion Control (ICMC) separates parameter specification, instruction generation and code synthesis for language-driven robot control, making execution outcomes traceable to instructions and programs. We compare one-shot generation with ICMC under o1 and o4-mini on cube pick-and-place and letter-reshaping tasks for a UR5e arm in MuJoCo. We then train an open-weight instruction policy by GRPO through a frozen code generator on cube placement onto two- and five-cube letter layouts, averaging the rewards of five programs per instruction. The logged positive-reward rate rose from 31.6% to 35.3% (253/800 to 282/800) between the first and last five training steps. A log audit identifies positive binary labels associated with geometric-failure messages: at least 19 in that run, 18 in the dense-reward run and 5 in the run with one program per instruction. In one case, all five rewards were 1.0 while the log reports a 0.9515 m miss against a 0.05 m tolerance; the verdict came from the program's own output stream. We distinguish logged reward rates from independently verified task success and report descriptive results for each configuration's single training trajectory. We introduce an independent evaluation protocol that checks task completion against fixed specifications, separating robot control from success assessment to support reproducible evaluation.

I. INTRODUCTION

Language models can generate programs that invoke robot primitives, so that a manipulation request can be expressed through a familiar code interface [1]–[3]. Prior work grounds actions in robot capabilities and current state [2], [4] and uses feedback to recover from failures [3], [5], while rearrangement evaluation compares the achieved scene with a specified goal [6]. These considerations go beyond syntactic correctness and motivate inspecting how a task becomes an executable program.

Two issues motivate this study. First, our one-shot baseline produces a complete program without a separately generated instruction artifact. Prior work combines code with execution-grounded reasoning [7]; we investigate a trainable instruction stage for tracing downstream failures. Second, one stochastic code sample can confound instruction quality with sampling variation, motivating our reward-averaging analysis. Separately, imperfect reward signals can favor unintended behavior or diverge from intended performance [8], [9]. Instruction-Conditioned Motion Control (ICMC) separates parameter specification, instruction generation and code synthesis over a fixed robot API for a UR5e arm in MuJoCo [10]. The intermediate action is the entire generated instruction text, which in practice contains both prose and a reference-code block (median code-line fraction 79.3% across the 32 instructions of the final step of the main binary-reward training run), so it is a language-to-code interface rather than a short symbolic plan.

We ask three questions. RQ1: how do one-shot code generation and ICMC compare under o1 and o4-mini on cube pick-and-place and letter reshaping, and how do same-backbone Chain-of-Code and iterative-correction implementations compare on reshaping? RQ2: what happens when an open-weight instruction policy is trained by GRPO [11] through a frozen code generator on cube placement onto letter-shaped layouts, with rewards parsed from program execution? RQ3: what do the archived comparisons of reward sampling (M=5 versus M=1), learning rate and update epochs establish, and which effects remain confounded?

This paper makes four contributions. First, a language-to-code decomposition over a fixed UR5e API that trains an inspectable instruction policy through a frozen code generator; retained records link instructions to syntax errors, undefined names and discrepancies between reward labels and logged geometry. Second, an audit of reward consistency: the main run's logged positive-reward rate rose from 31.6% to 35.3% between the first and last five steps, while inspection identifies at least 19 positive-reward logs reporting geometric failure in that run, 18 in the dense-reward run and 5 with one program per instruction (M=1). The audit traces success labels to the generated program's output stream. Third, a characterization of downstream reward variance: an estimator argument for averaging M program rewards per instruction, supported by the observation that 302 of the 640 instructions in the main run received mixed rewards across their five programs. Fourth, an independent evaluation protocol for checking task completion against fixed specifications, with simulator state and scoring controlled by a separate software supervisor. Its CPU implementation passed ten negative controls; a hand-authored reference controller completed all 40 predeclared scenes under this protocol.

The study characterizes simulated execution through one archived training trajectory per configuration. Evaluation of model-generated programs under the independent protocol, replication across training seeds, and matched tests of learning-rate and epoch effects remain future work.

References (19)

  • Code as policies: Language model programs for embodied control
  • ProgPrompt: Generating situated robot task plans using large language models
  • ChatGPT for robotics: Design principles and model abilities
  • Do as I can, not as I say: Grounding language in robotic affordances
  • Inner monologue: Embodied reasoning through planning with language models
  • Rearrangement: A challenge for embodied AI (opens arXiv in a new tab)
  • Chain of code: Reasoning with a language model-augmented code emulator
  • Concrete Problems in AI Safety
  • Scaling laws for reward model overoptimization
  • MuJoCo: A physics engine for model-based control
  • DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
  • LoRA: Low-rank adaptation of large language models
  • RT-1: Robotics transformer for real-world control at scale
  • RT-2: Vision-language-action models transfer web knowledge to robotic control
  • PaLM-E: An embodied multimodal language model
  • OpenVLA: An open-source vision-language-action model
  • Transporter networks: Rearranging the visual world for robotic manipulation
  • CLIPort: What and where pathways for robotic manipulation
  • Gymnasium: A standardized interface for reinforcement learning environments