\chapter{Discussion} \label{ch:discussion} The results acquired in the few experiments that were conducted didn't match the initial expectations of the project. Rather they showed the difficulties of working with OpenSim given only the locomotor primitive patterns as input data for the simulation. Since several insights into the working of OpenSim, its advantages and disadvantages were gained during the course of this project, mainly an evaluation of the OpenSim software shall be discussed here. \section{Simulation using Locomotor Primitives} The unrealistic behavior in the simulation can be attributed to three main reasons: lack of ground contact forces, scaling of the muscle activation and lack of joint constraints. As can be seen in the results for the exerted muscle forces, by scaling the muscle activations accordingly, at least the muscle forces can be limited to an appropriate range. One reason for the ``twiddling'' with the scaling of the activation is that OpenSim doesn't specify a unit for the muscle activation. Rather it's a normalized value in the range $0.0$--$1.0$, but the exact mapping of measured values to this range is unclear and no documentation could be found. Also the muscle's default activation parameter was found to play a crucial role in the behavior of the simulation. As with the muscle activation, unfortunately no documentation of the proper settings of this parameters could be found with OpenSim. The lack of data for ground contact forces most probably is the main reason for the problems with respect to the simulation. Ground contact forces were found to be crucial for the control of walking and the patterns of muscle activation involved in walking \cite{Ivanenko2002}. By not incorporating them in the simulation which is conducted using muscle activation data that was generated when ground contact forces were present, the experimental setup is not appropriately reproduced and the outcome of the simulation can become unrealistic. \section{Evaluation of OpenSim} OpenSim is a great tool to conduct biomechanics experiments -- when experimental data is available. Its usage thus mainly is in areas where such data can be directly gathered. Its community provides a wide array of musculoskeletal models and tools for analyzing simulations. However in order to use these appropriately, the availability of experimental data -- namely marker trajectories, ground reaction forces and electromyography measurements -- is key. The experimental protocols suggested to be used with OpenSim\footnote{\url{http:// simtk-confluence.stanford.edu:8080/display/OpenSim/Collecting+Experimental+Data}} are rather strict e.g. with respect to the measurement of forces. Up to now OpenSim is mainly used in biomechanics or clinical studies (e.g. to compare the effects of different treatments to pathological gaits). In all of these cases subject data were available. In this project however a lot of abstractions and simplifications (e.g. removing muscles, applying combined activations to certain muscles, neglecting ground contact forces) were made to a model whose purpose is to represent the human legs as anatomically correct and realistic as possible. Furthermore abstracted data was applied to it. This is not the indented usage of these models and the effects are unknown and cannot be predicted when lacking the proper knowledge about its exact working. Furthermore the models used are very sensitive to the type of muscle activation data that was provided (i.e. as could be seen in the random data tests). Unfortunately also the scales and units used for the input data and model parameters (e.g. joint parameters) is not always clearly disclosed. OpenSim's open-source nature makes it possible to build models and simulations from ground up. The API provided as part of Simbody and OpenSim provide a good base for physics-based simulations of multi-body systems. It can be extended and adjusted if needed. Implementing e.g. custom simulation controllers or custom muscle models can relatively easily be added and just need to implement the according interfaces, as it was done in this project. However documentation on most of OpenSim's internals is rather scarce or only available in the source code. Building an abstract model from ground up is not easy and the supporting tools provided by OpenSim are very rudimentary and are mostly targeted at changing existing models shipped with OpenSim. However if an abstract model shall be built -- given the experiences gained in this project -- it should be done bottom-up rather than top-down. Thus OpenSim with the provided muscle-skeleton models is in its current state not directly feasible for simulations lacking suitable experimental data.