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" />
{: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}
{/each} {/if}