I'm currently working on a relatively complex Exoskeleton Model in AnyBody and I keep running into the same problem with the InitialConditions. For example between a kind of rigid connection with the hip and a upper arm connection there are 4 joints (Prismatic, Hinge, Spherical and another Hinge). I only have motion capture data for the human model and I mapped the Exoskeleton CAD model onto that so that it follows the movements.
Theoretically, I have created the same amount of constraints as the Exo has degrees of freedom. But because of the "kinematic chains" there are more than one kinematic solution. So the initial position/orientation of the Exo seems to completely determine the kinematic solution, and small deviations of these positions create completely different kinematics or it cant be solved at all.
The main solution I've found was to tweak the Exo Position in SolidWorks until the Kinematic Solutions "looks right"... . I've also tried to hardcode the r0 and Axes0 properties of the Exosegments to where I want to have them but that was way to cumbersome and I would have to do it all over again when I'm gonna change something in the CAD Model.
So I wanted to know if there is a better solution/way to tackle this problem.
I also tried to solve it through some kinds of virtual Markers so that the Exo positions are more rigid but also overdetermined but that didnt work (I used the AnyKinDriverMarker Function).
Hope I made my problem clear enough.
I understand it can be challenging to have the kinematics working correctly when there are multiple solutions as you say. This, then, becomes a bit of an exercise in defining your constraints in such a way that the right solution is picked up. I can't say more on that since I don't have the details.
I can think of a couple ideas that may help you:
- Instead of hard coding the exo r0 and Axes0 properties in SolidWorks, you can code those values in AnyScript to point to the r0 and Axes0 values of the corresponding human segments. This way you can ensure your exoskeleton is more or less close to the human model and all the individual segments are somewhat oriented so that the solver can find the closest solution, which should be the right solution.
- You can consider adding some extra weak drivers for your exoskeleton that will push the solver to find the right solution.
I hope this helps.
Thanks for your reply.
Yes it helped, the WeakDrivers seem to show some promise.
And I wanted to assign the r0 and Axes0 values in AnyBody, but if I want to change anything in SolidWorks I have to re-export this file and that would erase everything. And overwriting these values in another file won't work I think as these variables would be declared twice. Or is there a way without having to change the exported file each time?
I think you are right about exporting with SolidWorks. I can't think of a way out at this point but this is a valid problem and we will try to look into this internally. I think it should be possible to update the Exporter to write the r0 and Axes0 values using "??=" operator. This will allow the users to overwrite r0 and Axes0 values in their model. Do you have ideas from your work of other values that are hardcoded from the Exporter but you may want to update those values in the model?
That would be great.
And currently I dont want to change/update any other values. I think most segment values like weight, dimension and inertias are way easier to set in SolidWorks and in my work they should stay constant.