ARM LAB / STUDY / LEVEL 5 OF 8

Annotation:
angles and limits.

An annotation is information drawn beside the robot without changing the robot, like the dials on a car's dashboard. The first one answers the operator's most basic question: what pose is the arm in, and how much room does each joint have left? Beside every motor the scene writes its angle and its range, and colours the text as the joint approaches a limit. The gripper gets a different label: the opening between its jaws in centimetres, because that is what matters when you want to pick something up. This page runs the scene's own jointLabel and limitFraction.

text ← angle[k]degrees and the lo..hi range, from the six numbers
→
colour ← limitFraction0 at mid-range, 1 at either end; orange from 0.85, red at 1
→
position ← jointPosthe joint's global matrix, column 3, every frame
→
gripper: centimetres2 L sin(θ/2) from the measured jaw geometry

What the headset shows

labels from the real jointLabel, placed at the real joint positions

The six numbers

joint 3 is selected (cyan)

The gripper's centimetres

measured, then fitted

The servo's range is −10°..+100°, but the two jaw tips, measured from the STL triangles, touch at about +12°. Below that the moving jaw passes through the fixed one: a real jaw would be stopped by the other jaw or by the object. So the scene calls +12° "closed", stops the gripper there (its physical limit, instead of the servo's −10°, so the jaws never pass through each other), and converts the angle above it into a jaw opening. The tips swing on an arc of radius L, so the gap between them is the chord 2 L sin(θ/2); L = 8.4 cm fits the measurements.

gripper anglemeasured tip gap2 · 8.4 · sin((θ − 12°)/2)

      

The label and its colour

so101Model.js · armLab.js

limitFraction measures from the middle of the range, so an asymmetric range like the wrist roll's (−157°..+163°) is handled. The scene builds the text, picks a colour, and places it 5 cm above the joint, 12 cm toward the player, each label a little higher than the last so neighbours do not overlap.


      

      
    

What you should be able to explain

  1. Two sources, one label. The words and numbers come straight from angle[k] and the table; they never pass through a matrix. Only the label's place comes from the engine.
  2. The limit fraction. |angle − mid| / half. At 0 the joint is in the middle of its travel; at 1 it is against a limit. It is a fraction so the same thresholds (0.85 orange, 1 red) work for a joint with ±97° and one with ±110°.
  3. Why the gripper is different. An operator does not think "60°", they think "will a 5 cm object fit between the jaws?" The label answers that question, and it marks the range where the model does something the real robot cannot.
  4. Cheap text. Text is geometry here. The scene rebuilds a label's mesh only when its string changes (angles are rounded to whole degrees, so most frames change nothing) and moves it every frame, which is cheap.

Exercises: ① Set the wrist roll to 0°: its meter is not centred. Why, and what is its fraction? ② Find the smallest gripper angle at which the label stops saying JAWS OVERLAP, and the opening for 45°. ③ Why does the scene round to whole degrees before building the text?