I'm running an ankle rehabilitation device with an inverse dynamics singularity problem, and it's not clear how to fix it now? I have no problem running the inverse dynamics of the human model and the mechanical model separately, but when analyzing them together, I get an error? Is it because I'm using soft constraints? Can someone help me? Thanks!
It is not unusual to get this error when you try add additional segments into your model. You have to be careful about the degrees of freedom and reactions needed.
It's great to know that you can run the two models independently. Then, the next step will be to bring the two models inside a single model. Here you can start with the human model and try to add the ankle rehabilitation device into the human model. If you do that successfully, you should be able to run the two models inside the same model independently. That is, there will be no connection between the human and the device.
The second step will be to try to link the human to the rehabilitation device. You should do this step by step, constantly thinking about the degree of freedom that you are linking between the two. This will add a constraint and then you must free another constraint/driver that was controlling this movement before you linked them up.
As an example, you have an ankle flexion driver for the human, and some driver on your device that holds resting plate horizontally. If you try to link the foot to the this plate, then you must free up either the ankle driver on the human, or the driver on the device that maintains the plate horizontally.
You can read this wiki page on connecting an exo and human. The concepts are similar for you as well.
Thank you for your patient response! One more thing I'm confused about: in the overdetermined system, is it that all drives and joints should be set to soft constraints? Why is it that sometimes the joints of the mechanical model are misaligned when analyzed with soft constraints? I look forward to your reply, thank you!
Usually, when your DOFs and number of constraints are the same, you can use determinate kinematics. However, when they do not match, you should run it with overdetermined kinematics.
Lets say you have a system with 1DOF that you can drive and you have two drivers (basically two constraints to bound one DOF). Then to make it work, at least a constraint will be violated and that is the soft constraint. The hard ones will not be violated.
So the answer is that you can decide which one of your constraints should be soft and they maybe violated if necessary. So maybe not all of them, but that is a choice relevant to the model and the data you have. And the misalignment that you see is because they were soft and allowed to be moved.
You can always check our Ref. Manual, it normally contains all the information and some class examples. Secondly, one can always search forum for the relevant keyword.