Here is the corrected suggestion on how to build the modified DH parameter model. The vertical offset (0.75") between J1 and J2 make things a bit more complex then in the 'puma560' sim config.
Some explanation on how modified DH parameters work:
- Each parameter set describes the coordinate transformation from one coordinate frame (F0..F6) to the next.
- Each transformation consists of the same sequence (X,Z directions here follow the current coordinate frame!)
1. Translation along Xn so that the origin of the coordinate frame lies on the rotational axis of the next joint (Jn+1)
2. Rotation around Xn so that Zn is collinear with the rotational axis of the current joint Jn . Note that the direction of Zn and the rotational direction of the physical joint MUST be identical!
3. Translation along Zn so that the Xn direction intersects with the rotational axis of the next joint (Jn).
- At the end of each transformation sequence we have created a new coordinate frame Fn+1.
Note that with these rules it is not possible to build a transformation from F2 to F3 without rotating J1 by angle theta1 so that the rotational axis of the next joint (J2) intersects with the X vector of F2. This then requires rotating J2 the same amount but in the opposite direction so the lower arm is vertical again. This needs to be corrected in the configuration by either setting a corresponding HOME_OFFSET value for JOINT_1 and JOINT_2 in the INI file or setting the work_offsets accordingly when in JOINT mode (these must then be deactivated when switching to WORLD mode)