inverse kinematics of 7-DOF with joint offset and joint limits