Designing the software
The first steps in designing the robot arm control software are to establish a coordinate frame (how we measure movement), after which we set up our solution space by creating states (arm positions) and actions (movements that change positions). The following diagram shows the coordinate frame for the robot arm:
Figure 5.2 – Robot arm coordinate frame
Let’s define the coordinate frame of the robot – our reference that we use to measure movement – as shown in the preceding diagram. The X direction is toward the front of the robot, so movement forward and backward is along the X-axis. Horizontal movement (left or right) is along the Y-axis. Vertical movement (up and down) is in the Z direction. We place the zero point – the origin of our coordinates – down the center of the robot arm with zero Z (Z=0) on the floor. So, if I say the robot hand is moving positively in X, then it is moving away...