For these examples, we're going to assume that the upper arm and forearm are the same length. As you'll see in the example below, we define a local coordinate frame for each segment of the arm, where:
Look at each of the screenshots below, and think carefully about the local coordinate frame for each segment, and how that affects the way the next segment is oriented with respect to it.
If all angles are 0°, then the whole robot arm sticks straight up the Z axis. This situation results from calling:
no_angles = np.array([0, 0, 0]) sg = makeScenegraph(1, 5, 5, 2, no_angles, no_angles, no_angles)
If all yaws are -60° and all other angles are 0°, then the robot's wrist intersects the X axis and the hand is pointing straight down Z beneath the X-Y plane. Note that it's a negative-angle yaw that tilts toward the X-axis, because yawing these blocks happens around the -Y axis, and a positive yaw would instead tilt toward -X.
Here's the call that creates this scene:
yaw_neg60 = np.array([-np.pi/3, 0, 0]) sg = makeScenegraph(1, 5, 5, 2, yaw_neg60, yaw_neg60, yaw_neg60)
If all pitches are 60° and all other angles are 0°, then the robot's wrist intersects the -Y axis and the hand is pointing straight down Z beneath the X-Y plane. This situation results from calling:
pitch_60 = np.array([0, np.pi/3, 0]) sg = makeScenegraph(1, 5, 5, 2, pitch_60, pitch_60, pitch_60)
Here's what happens if all rolls are 30° and all other angles are 0°. Note that each roll is counterclockwise when looking down the Z axis. (In the picture, Y goes straight back, away from the viewer, and Z goes straight up.) This situation results from calling:
roll_30 = np.array([0, 0, np.pi/6]) sg = makeScenegraph(1, 5, 5, 2, roll_30, roll_30, roll_30)