Step 6
Chaining transforms: forward kinematics
Multiply one transform per joint and link to get the gripper's pose, then use it to read a sensor on the hand.
One joint, one link, one matrix
Forward kinematics answers: for joint angles (base, shoulder, elbow, wrist), where is the gripper and which way does it face? Pick & Place, step 2 found the position with trigonometry. Transforms find both by multiplying.
Walk from the base to the gripper. Each joint turns the frame it is in: the base about , then the shoulder, elbow and wrist about . Each link then moves along the new axis by its length. Write and for the joint turns and for a move of metres along , all as 4×4 transforms:
is the shoulder's height above the table; , and are the upper arm, the forearm and the wrist to the fingertips. All four are in arm.links. Each factor acts in the frame the ones before it built, so the product reads left to right like a walk along the arm. Stop partway and you have the frame at that joint.
The result holds both answers: its last column is the gripper's position, and its rotation is step 4's .
A sensor on the hand
This step's detector is bolted to the hand, so it moves with the arm. Its pose relative to the tool never changes: that's detector.T_tool_det, . Its pose in the world depends on the whole arm:
The inner "tool"s cancel. A ball the detector sees at is at in the world. Robots with a camera on the wrist ("eye-in-hand") do this for every image. The detector sees only balls within 60° of its axis, so the starter first lifts the arm to a look-out pose.
Jacobians, step 2 differentiates this chain to see how each joint moves the gripper.
Your task
- Complete
arm_frames(q): the frames after the shoulder, elbow and wrist joints, then the tool frame.tool_pose(q)returns the last one, and the starter draws them all on the arm. - At the look-out pose, combine
tool_pose(arm.q)anddetector.T_tool_detinto the detector's world pose. - Convert the blue ball's reading to the world and drop the ball in the cup with
pick_and_drop.
detector.pose and world.balls() are switched off here.