Task analysis
Our task in this chapter is one that you may have been waiting for, if you have been keeping score since Chapter 3, where we discussed our storyboards. We need to choose a way to pick up the toys with the robot arm. This involves picking a proper orientation for the wrist joint. Since our toys are randomly placed, by those experts at random, my grandkids, the toy may be in any orientation relative to the floor, and at any angle relative to the robot. We need some method for observing the toy with the robot and appropriately orienting the robot’s hand to grasp the toy.
Decision trees
The concept of a decision tree is fairly simple. You are walking down the sidewalk, and come to a corner. Here you can go right, turn left, or go straight ahead. That is your decision. After making the decision – turn left – you now have different decisions ahead of you than if you turned right. Each decision creates paths that lead to other decisions:

In this decision tree, I decide what to...