Robot Joint Settings
{#if robots.length === 0}
No robots in the environment. Create a robot first using the Control Panel.
{:else} {#each robots as [robotId, robotState]}
Robot:
{robotId.slice(0, 8)}...
{#if robotState.robot.joints.length === 0}
No joints found for this robot.
{:else}
Joints:
{#each robotState.robot.joints as joint, jointIndex} {#if joint.type === 'revolute'} {@const currentValue = getJointRotationValue(joint)} {@const limits = getJointLimits(joint)} {@const axis = joint.axis_xyz || [0, 0, 1]}
{joint.name || `Joint ${jointIndex}`}
({joint.type})
Axis: [{axis[0].toFixed(1)}, {axis[1].toFixed(1)}, {axis[2].toFixed(1)}]
{currentValue.toFixed(1)}°
{limits.min.toFixed(0)}° to {limits.max.toFixed(0)}°
updateJointRotation(robotId, jointIndex, parseFloat(e.currentTarget.value))} class="w-full h-2 bg-slate-600 rounded-lg appearance-none cursor-pointer slider" />
updateJointRotation(robotId, jointIndex, 0)} class="text-xs px-3 py-1 bg-slate-600 hover:bg-slate-500 text-slate-200 rounded transition-colors" > Reset to 0°
{:else if joint.type === 'continuous'} {@const currentValue = getJointRotationValue(joint)} {@const limits = getJointLimits(joint)} {@const axis = joint.axis_xyz || [0, 0, 1]}
{joint.name || `Joint ${jointIndex}`}
({joint.type})
Axis: [{axis[0].toFixed(1)}, {axis[1].toFixed(1)}, {axis[2].toFixed(1)}]
{currentValue.toFixed(1)}°
{limits.min.toFixed(0)}° to {limits.max.toFixed(0)}°
{:else if joint.type === 'fixed'}
{joint.name || `Joint ${jointIndex}`}
(fixed joint)
{/if} {/each}
{#if robotState.urdfConfig.compoundMovements}
Compound Movements:
{#each robotState.urdfConfig.compoundMovements as movement}
{movement.name} {#each movement.dependents as dependent}
{dependent.joint}
{/each}
{/each}
{/if} {/if}
{ robotState.robot.joints.forEach((joint, index) => { if (joint.type === 'revolute') { updateJointRotation(robotId, index, 0); } else if (joint.type === 'continuous') { updateJointRotation(robotId, index, 0); } }); }} class="w-full px-3 py-2 bg-sky-600 hover:bg-sky-500 text-white rounded transition-colors text-sm font-medium" > Reset All Joints to 0°
{/each} {/if}