Manual Control

Direct robot joint manipulation

{#if robot}
{#if robot.isManualControlEnabled}

Joint Controls

{robot.jointArray.length}

Each joint can be moved independently using sliders. Values are normalized percentages.

{#if robot.jointArray.length === 0}

No joints available

{:else}
{#each robot.jointArray as joint (joint.name)} {@const isGripper = joint.name.toLowerCase() === "jaw" || joint.name.toLowerCase() === "gripper"} {@const minValue = isGripper ? 0 : -100} {@const maxValue = isGripper ? 100 : 100}
{joint.name}
{joint.value.toFixed(1)}{isGripper ? "%" : "%"} {#if joint.limits} ({joint.limits.lower.toFixed(1)}° to {joint.limits.upper.toFixed(1)}°) {/if}
{ const val = parseFloat((e.target as HTMLInputElement).value); robot.updateJoint(joint.name, val); }} class="slider h-2 w-full cursor-pointer appearance-none rounded-lg bg-slate-300 dark:bg-slate-600" />
{minValue}{isGripper ? "% (closed)" : "%"} {maxValue}{isGripper ? "% (open)" : "%"}
{/each}
{/if}
{:else}

Input Control Active

Input Control Active Robot controlled by: {robot.consumer?.name || "External Input"}
Disconnect input to enable manual control.
{/if}
{/if}