build_stance_relative_mapping
Compile stance-relative motor targets into reflex voxel rows by converting per-channel joint offsets to destination z bins; preview mappings and warnings before applying.
Instructions
Compile stance-relative motor targets (joint units) into reflex voxel rows.
Motor targets on a PositionalServo absolute OPU are absolute and held. This builds a
reflex as a small offset around a per-channel stance: source bin i (along
src_axis of src_fixed) commands reference + gain * (i - src_center) joint
units, bins within deadband of the center map to nothing, and the offset is clamped
to max_offset. Joint units become dst z bins using the joint range, dst_depth
and the destination OPU's registered coding: FEAGI's own coder (feagi_rust_py_libs)
bound to the unit the agent's device registration states, so a connected controller is
needed. dst_depth is optional and must equal the area's z depth. Check any bin with
convert_io_value.
channels: [{"channel": int, "reference": float, "range": [min, max]?, "src_fixed": [x, y, z]?, "gain": float?, "max_offset": float?, "deadband": float?}].
A channel's gain, max_offset and deadband override the top-level values for
that channel; unknown channel keys are rejected. A warning is returned when a channel's
abs(gain) is below one dst z bin in joint units ((max - min) / (dst_depth - 1)),
since the offsets then quantize. reference is in joint units; read it from the model
(keyframe) yourself. n_stance_voxels: stance voxels active on the same channel at
once; the decoder averages all active z, so the reflex z is mean-compensated.
coactive_z: z of another source's rest voxel active on the same channel while this
source fires (one integer for every channel, or {"<channel>": z} as an object or JSON
string); the reflex z becomes 2*z_target - coactive_z. Mutually exclusive with
n_stance_voxels.
Default dry_run=True returns voxel_mappings, a table_text (src bin -> target
value), stance (the stance voxel to drive continuously) and warnings without
writing. dry_run=False then calls build_reflex_mapping. Verify the sign with a
probe afterward.
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": {
"src_area_id": "<src_area_id>",
"dst_area_id": "<dst_area_id>",
"morphology_name": "<morphology_name>",
"src_axis": "<src_axis>",
"src_bins": "<src_bins>",
"channels": "<channels>",
"gain": "<gain>"
},
"name": "build_stance_relative_mapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gain | Yes | ||
| dry_run | No | ||
| channels | Yes | ||
| deadband | No | ||
| src_axis | Yes | ||
| src_bins | Yes | ||
| dst_depth | No | ||
| src_fixed | No | ||
| coactive_z | No | ||
| max_offset | No | ||
| src_center | No | ||
| dst_area_id | Yes | ||
| joint_range | No | ||
| src_area_id | Yes | ||
| morphology_name | Yes | ||
| n_stance_voxels | No | ||
| replace_existing | No | ||
| synaptic_delay_bursts | No | ||
| postsynaptic_current_multiplier | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||