Joint-space vs straight-line (Cartesian) motion: experiment bench
Joint-space vs straight-line (Cartesian) motion
Move a 2-link arm between two points by interpolating its joints, or by solving IK along the straight line, and compare the paths.
- 1. Ask
- 2. Hypothesise
- 3. Set up
- 4. Run
- 5. Record
- 6. Change one variable
- 7. Compare
- 8. Interpret
- 9. Limitations & save
If I change …, then … will …, because …
3 · Set up the parameters
1 more control appear at higher levels; until then it stays at the default value.
The seed fixes any random noise. Same parameters + same seed = exactly the same result, every time, on every computer.
6 · Change one variable
Your first run is the baseline. After it, change one thing at a time.
7 · Compare on a graph
5 · Run log
No runs yet.
Equations
Joint space: θ(s) = θ_A + s·(θ_B − θ_A). Cartesian: p(s) = p_A + s·(p_B − p_A), then θ(s) = IK(p(s)).
Assumptions (always true in this model)
- Planar arm: everything happens in one flat plane.
- Rigid links and ideal revolute joints: no bending, backlash or play.
- Kinematics only: no masses, gravity or motor dynamics in this model.
- Distances in centimetres, angles in degrees on the controls (radians inside the maths).
- Elbow-up IK branch throughout; no joint limits or collisions in this model.
Text description of what the chart shows
Two ways of moving an arm between the same start and end points. The first plot shows how far each path strays from the straight line over time: the joint-space path bows outwards, the IK path stays on the line where it can. The other plots show the shoulder and elbow angles for each method.
Did the result support your hypothesis? Use the numbers from the comparison table and link them to an equation.
Which assumptions could change your answer in the real world?
Export and save
Exports use the ticked runs (or every run if none are ticked). Your draft saves automatically in this browser only. The Journal is private to you.
Valid parameter ranges
| Parameter | Range | Default |
|---|---|---|
| Link 1 length L₁ | 5 to 40 cm | 20 |
| Link 2 length L₂ | 5 to 40 cm | 15 |
| Start x | -40 to 40 cm | 26 |
| Start y | -40 to 40 cm | 8 |
| End x | -40 to 40 cm | -8 |
| End y | -40 to 40 cm | 26 |
| Samples along the move | 10 to 400 | 100 |
Independent reference checks
pure shoulder sweep 10° → 100° at R = 28 cm
Geometry: both ends at the same radius ⇒ same θ₂, so joint-space motion is an arc of radius 28 cm; sagitta R(1 − cos 45°) = 8.201 cm; chord 2R·sin 45° = 39.598 cm.
line through the hole
Hand: the chord from (20, 0) to (−20, 0) is 40 cm and passes through the base, inside the 5 cm unreachable hole.
Checked automatically on every change to the code. Educational model, not engineering-grade.