Rotation and Translation in Turn

Input: block of yellow barrel cam and green disk cam.
Output: pink shaft: move forward – turn right – move backward – turn left.
The barrel cam controls linear motion.
The disk cam controls 90 deg. angular motion.