## 6 Discussion and Conclusions  
In this study, the subtask-based optimization approach has been presented to predict the box delivery motion. A motion capture experiment was conducted to collect kinematic data for box delivery validation. In addition, results from the simulation were compared with the experimental data. In Figure 5, the predicted joint angles (spine, shoulder, elbow, right knee) for the subtask method lie within the standard deviation of the mean for the major portion of the motion and also follow the similar trend as the experimental mean, indicating reasonable agreement with the experimental results. For the right hip angle in Figure 5d, the carrying motion has a similar trend as the experimental mean but is outside the standard deviation. The minimum values are outside of the experimental standard deviation. This is because we did not impose experimental boundary conditions for carrying simulation, instead the carrying motion only satisfies symmetry and continuity boundary conditions on itself. Two transition subtasks took place at around 20-30% and 70-80% time periods, respectively. Joint discomfort objective function was used to reduce the redundant motion for the subtask-based  
Figure 6: Joint torque profiles for deliver motion: (**a**) spine, (**b**) shoulder, and (**c**) right hip. approach as seen in Figure 5. For lifting and unloading motions, although the experimental boundary constraints were imposed, the spine and shoulder joint angles are still partially outside the standard deviation between the boundaries as seen in Figure 5a,b. For transition motion in Figure 5, the continuity boundary conditions were imposed on joint angles and angular velocities only, not on joint accelerations as shown in Equation (21). Therefore, there were small jerks at transitions. However, if we also imposed the joint acceleration continuity constraint, it would make the optimization design space too tight, and the optimization problem difficult to converge. In addition, the hip joint angle profile deviated from the experimental data during the carrying motion. This is because we did not use any experimental data for the lower body during carrying motion. The amount of experimental data used in the optimization formulation compromises the power of prediction. Here, we find a balance between them. The proposed optimization formulation for carrying motion predicts knee and ankle joint angles well without relying on lower body experimental data. The spine, shoulder, and right hip joint torque profiles in Figure 6 showed repeatable patterns during carrying motion as expected. For the subtask-based approach, there were oscillations of torque values at the boundaries of transition phase. This is due to the discontinuity of joint acceleration between subtasks in the model. The total CPU time for the subtask-based method was 6.71 s, as seen in Table 2. It is shown that each subtask is a small-scale optimization problem so that the subtask-based method converges fast. If we simulated a box delivery motion with more carrying steps as one single task optimization problem, the convergence time could be longer. In contrast, the CPU time for the subtask-based approach did not change with the increasing number of carrying steps because the carrying gait can repeat on itself. It can be seen from Table 3 of the RMSE and Pearson's coefficient that the formulation could provide reasonable results. The major advantages of the proposed subtask-based optimization method include: First, each subtask is a relatively small scale optimization problem which is easy to formulate based on the well-studied subtask in the literature [7; 22; 23]. Secondly, the subtask simulation is computationally efficient and is close to real-time implementation. Third, each subtask can be formulated as a separate optimization problem with different cost functions.