Step 1
Links, joints & degrees of freedom
Take the arm apart joint by joint, and meet a robot with a joint that has no motor.
Links and joints
A robot arm is a chain of rigid links (the solid parts) connected by joints (the parts that move). Most joints come in one of two kinds:
| Joint | Moves by | Its value is | Example |
|---|---|---|---|
| Revolute | turning about an axis | an angle (rad) | every joint of this arm |
| Prismatic | sliding along an axis | a distance (m) | a linear rail, a lift |
Degrees of freedom
Each joint adds one degree of freedom (DOF): one more number you need to pin down where every part of the robot is. The list of those numbers is the configuration, written . For this arm, arm.q holds for the base, shoulder, elbow and wrist, in radians. Add how fast each one is changing, (a dot means "rate of change"), and you have the robot's state: where it is and how it is moving.
Real joints can't turn forever. Cables and hard stops give each one joint limits, a smallest and a largest angle. arm.limits has one [min, max] row per joint.
Actuated and passive
A joint with a motor is actuated: you can command it. A joint without one is passive: it moves only when something else pushes it, such as gravity or the parts it is attached to.
The cart-pole to the arm's right has both. A motor pushes the cart along a rail with the force you choose, cartpole.force(newtons). On top of the cart, a pole swings on a hinge that has no motor at all. cartpole.state() returns : the cart's position along the rail (m), the pole's angle from upright (rad), and how fast each is changing.
The starter's watch(seconds) runs the simulation and plots every joint as it goes, so the Plots tab shows exactly what moved, and when.
Pick & Place, step 1 drives these four arm joints to reach a pose.
Your task
- Move the arm one joint at a time, each in its own phase:
phase("base")is done for you, then"shoulder","elbow"and"wrist". Move each by at least 0.3 rad, stay insidearm.limits, and leave the other three alone. - In a
"cart-pole"phase, push the cart for a moment, set the force back to 0, and watch the pole. - Fill in
ARM_DOF(leave out the gripper),CARTPOLE_DOF,CARTPOLE_ACTUATED(how many of the cart-pole's joints have a motor) andCART_JOINT("revolute"or"prismatic").