send_motor_command
Commands a robot joint to a fraction or physical value, checking a Cartesian fence to reject unsafe moves before firing OPU stimulation.
Instructions
Command one robot channel to a fraction or value via OPU stimulation (fence-checked).
This is a high-level convenience tool that:
Looks up the channel's OPU area and index from the agent's device registrations.
Binds the registered unit to FEAGI's coder (
feagi_rust_py_libs) to get the z bin that decodes to the target.Fires that voxel (
[channel x per-channel width, 0, z]) viastimulate_area_batch.
Pass exactly one of fraction (0..1, always accepted) or value (physical units; the
channel must state a physical_range in its registration, otherwise the call is an error
naming the missing range; there is no default range). Out-of-range values are clamped and
flagged.
Prerequisites:
The experiment must be running in Studio (
_experiment.statein the result, orget_experiment_status).The controller bridge must be running (check with
list_controller_bridges).The agent must be registered (check with
get_registered_agents).The burst engine must be running (check with
get_burst_engine_status).
Use get_agent_joint_map first to discover available joint names, and
convert_io_value to see a channel's physical_range.
Args:
agent_id: Agent identifier (from get_registered_agents).
joint_name: Channel name as reported by get_agent_joint_map
(joint_name, actuator_name, or source_entity;
case-insensitive match).
fraction: Decoded fraction 0..1 to command.
value: Physical value to command, in the registered physical_range unit.
Returns:
Stimulation result with resolved cortical area, voxels, the bin, and the fraction
(and value) that bin decodes to. When a MuJoCo controller with an enabled Cartesian
fence is reachable, the result also has fence (rejection count before and after,
and rejected). If the fence refused the move, ok and success are false and
error / violation_mm say by how much; the arm did not move. The controller
counts a rejection asynchronously, so the call waits a few bursts (fence.waited_s)
before reading it. fence.checked is false when the controller cannot be read.
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": {
"agent_id": "<agent_id>",
"joint_name": "<joint_name>"
},
"name": "send_motor_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | ||
| agent_id | Yes | ||
| fraction | No | ||
| joint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||