Skip to main content
Glama

set_joint_targets

Set robot joint drive position targets by joint name or ordered list; write them to USD so physics moves joints toward them during simulation.

Instructions

Set the position targets of a robot's joint drives, which physics drives the joints toward while the simulation plays.

A dict sets the joints it names and skips names it doesn't find; a list follows the order of get_robot_info's Joints list, not of its joint states. A joint without a drive gets one, with stiffness 1000 and damping 100. It writes USD, so it works stopped too, before physics has started. The answer counts the targets set; get_robot_info then reads where the joints are, in radians, while the simulation plays or is paused.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prim_path": "<prim_path>"
    },
    "name": "set_joint_targets"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetsNoRequired: {joint_name: value}, or [v0, v1, ...] in get_robot_info's joint order, fixed joints included; degrees for revolute joints, stage units for prismatic ones
prim_pathYesThe robot's root prim, e.g. "/World/G1"

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.3
    • changedInput schema / properties / targets / description
      Previous value: -"{joint_name: value} or [v0, v1, ...] in joint order: degrees for revolute joints, metres for prismatic ones"New value: +"Required: {joint_name: value}, or [v0, v1, ...] in get_robot_info's joint order, fixed joints included; degrees for revolute joints, stage units for prismatic ones"
  2. First observedv0.2.2

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses that a dict skips unknown joint names, a list uses get_robot_info's Joints order, missing drives are created with stiffness 1000 and damping 100, USD is written, and the call works before physics. These are meaningful side-effect and operational details not present in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description front-loads the purpose and then packs dict/list behavior, auto-drive side effects, and read/write context into a few dense sentences. There is minor repetition about simulation playing, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter write tool with an output schema, it covers units, ordering, missing-joint behavior, auto-drive creation, USD write behavior, and return count. It omits what happens if targets is null or omitted and does not discuss error cases for an invalid prim_path, leaving a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds semantics beyond the schema: dict entries set only named joints and skip missing names, and list order follows get_robot_info's Joints list rather than joint states. It does not elaborate on prim_path beyond the schema, but the targets nuances are valuable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb "Set" with the resource "position targets of a robot's joint drives" and explains that physics drives the joints toward them during simulation. It also distinguishes this write operation from get_robot_info's read of joint positions, so an agent can identify the tool's role without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for use: during simulation or stopped before physics starts, and it distinguishes setting targets from reading joint positions via get_robot_info. It does not explicitly name alternatives such as apply_force or sim_control or state when not to use it, so it is clear but lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.