Plan a collision-free trajectory.
Search joint-space waypoints, try shortcuts and independently verify the full motion.
By the end: Distinguish candidate planning from continuous collision, speed, joint-limit and task-endpoint checks.
Start with something concrete.
Two safe arm postures can have an unsafe motion between them. A line drawn by the tool tip also cannot tell you whether the elbow or either link hits an obstacle.
Try the interactive model ↓A shortcut removes several waypoints. Does that guarantee a lower peak joint speed at the same total duration?
Change one thing. Watch what follows.
- Inspect the direct-motion collision despite safe endpoints.
- Compare the bounded grid candidate and shortcut candidate.
- Shorten total duration to expose a separate speed failure.
- Move the obstacle and rerun planning.
- Inspect a posture along the timed path.
- Distinguish a collision from an unresolved verification or finite-grid failure.
Loading this browser experiment…
Safe endpoints do not establish safe motion
The previous inverse-kinematics lesson checked final postures. Now the arm must move between two specified joint configurations. An obstacle can block the motion even when neither endpoint touches it. Checking only the tool tip also misses collisions along the links.
The experiment has two capsule-shaped links, one fixed disk obstacle and explicit joint stops. It excludes self-collision, gravity, forces and tracking error. The task is to reach the exact requested joint configuration, not merely some posture with a similar tool position. Those assumptions define what its acceptance result means.
Search in configuration space
A configuration is a pair of joint angles. Imagine a map whose horizontal axis is shoulder angle and whose vertical axis is elbow angle. Each point describes a whole arm posture; an obstacle in this map represents a posture in collision, not simply the disk’s shape in the physical world.
The planner searches a 15-degree grid with four neighbors per point. It can expand at most 441 nodes. Each candidate edge checks five postures with a small extra planning margin. This is a bounded proposal mechanism. A failed search says that this grid did not produce a candidate; it does not prove that every continuous path is impossible.
Optimize a candidate without trusting it blindly
The optional shortcut pass tries to join nonadjacent waypoints directly. It removes intervening points when its sampled checks pass, with at most 80 attempts. This is greedy local simplification, not a claim of global optimality.
A shortcut may cut a corner near an obstacle. Both the original candidate and the shortened one therefore need an independent final check. The verifier uses separate geometry calculations and a continuous-motion bound rather than simply reusing the planner’s five samples.
Bound what happens between samples
At a midpoint posture, the verifier measures clearance from both complete links to the disk, accounting for link radius. It also bounds how far any point on the arm could move over that interval. If clearance exceeds that movement, the whole interval is clear under the declared geometry.
A shoulder turn can move both links; an elbow turn affects only the second link. A conservative movement bound is 1.8 × absolute shoulder change + 0.8 × absolute elbow change, with changes in radians. These coefficients come from the maximum distance affected by each rotation. This bound also covers the straight segments between joints.
If the midpoint’s clearance is too small to certify the interval, the verifier splits it and tries again. A detected contact is a collision. Reaching the depth or work cap without a certificate is unresolved. Both prevent acceptance. The smallest evaluated clearance is displayed as a sampled diagnostic, not falsely reported as the exact continuous minimum.
Why the bound is conservative
A point at radius r moves along an arc of length r × angle change; its straight displacement cannot exceed that arc length. Add the possible displacement caused by each joint. Distance from a fixed obstacle cannot decrease by more than the movement of a link point. Therefore midpoint clearance greater than the maximum movement to either side guarantees positive clearance over that interval in the ideal mathematical model.
The implementation uses binary floating-point arithmetic and a contact tolerance of 10⁻¹⁰ metres. It is not a formal interval-arithmetic proof or certification for a physical mechanism. The work cap is 20,000 evaluations and the subdivision depth is ten.
Add timing and check speed
A geometric path has no duration until we assign one. The lab divides total time equally among its remaining segments. Within each segment, the fraction of angular movement follows 3u² − 2u³, where u runs from zero to one.
This curve begins and ends with zero speed. It makes joint position and velocity continuous across waypoints, but acceleration can jump. The exact peak joint speed is 1.5 × absolute angle change divided by segment duration. The verifier compares that value with the selected limit; it does not infer speed from the display samples.
Removing waypoints can make one remaining segment much longer. Equal time allocation may then give it too little time, so shortcutting can cause a speed failure even when geometry improves. Increasing duration can repair excessive speed. It cannot make a colliding path clear. Acceleration and motor-torque limits are still outside this model.
Keep task and motion requirements together
Passing collision checks alone is insufficient. The candidate must start and end at the required configurations, stay within joint limits and pass speed and continuous-clearance checks. A path to the wrong goal is not a successful task.
In a richer manipulation task, a planner also needs to choose actions such as reaching, grasping and releasing, with contact and object-state requirements. This lesson supplies a motion-verification component, not a complete task-and-motion planner. A grasping task would need the contact constraints from the preceding lesson as well as geometry.
Produce a trajectory audit
Guided learners can compare direct motion, grid motion and shortcuts, then shorten duration until speed fails. Implementation learners should independently replay link distances and cubic velocity extrema, and construct a collision between safe endpoints. Decision learners should describe which assumptions would need revision for uncertain sensing, tracking error, moving obstacles and actuator limits.
The slider inspects a frozen candidate without background animation. Rejected candidates remain inspectable and labelled as rejected. Three temporary captures retain the scenario and verification evidence. Human implementation review and learner pilots remain pending.
A verifier reaches its subdivision limit without certifying an interval. What should acceptance do?
Take this idea with you.
A path proposal becomes an accepted trajectory only after its geometry, timing and task requirements pass the declared independent checks.